Function at 0x437910
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4bb910
mov eax, dword fs:[0]
push eax
sub esp, 0x50
mov eax, dword [0x4ed310]
xor eax, esp
mov dword [esp + 0x48], eax
push ebx
push esi
push edi
mov eax, dword [0x4ed310]
xor eax, esp
push eax
lea eax, [esp + 0x60]
mov dword fs:[0], eax
xor eax, eax
mov ebx, ecx
mov ecx, dword [ebp + 8]
mov word [esp + 0x3c], ax
mov edi, 7
mov eax, ecx
mov dword [esp + 0x50], edi
mov dword [esp + 0x4c], 0
lea esi, [eax + 2]
lea esp, [esp]
mov dx, word [eax]
add eax, 2
test dx, dx
jne 0x437970
sub eax, esi
sar eax, 1
push eax
push ecx
lea ecx, [esp + 0x44]
call fcn.00401bf0
xor esi, esi
mov dword [esp + 0x68], esi
push 0xffffffffffffffff
xor ecx, ecx
push esi
lea edx, [esp + 0x44]
mov word [esp + 0x28], cx
push edx
lea ecx, [esp + 0x2c]
mov dword [esp + 0x28], 0xffffffff
mov dword [esp + 0x40], edi
mov dword [esp + 0x3c], esi
call fcn.00401780
mov byte [esp + 0x68], 2
cmp dword [esp + 0x50], 8
jb 0x4379d1
mov eax, dword [esp + 0x3c]
push eax
call fcn.0049855c
add esp, 4
xor ecx, ecx
mov word [esp + 0x3c], cx
push 1
lea ecx, [esp + 0x20]
mov dword [esp + 0x54], edi
mov dword [esp + 0x50], esi
call fcn.00434900
test al, al
jne 0x437a27
mov eax, dword [esp + 0x1c]
cmp eax, 0xffffffff
je 0x437a0c
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp eax, 1
jne 0x437a0c
mov dword [esp + 0x1c], 0xffffffff
cmp dword [esp + 0x34], 8
jb 0x437a20
mov edx, dword [esp + 0x20]
push edx
call fcn.0049855c
add esp, 4
xor eax, eax
jmp 0x437bbb
mov ecx, dword [ebx + 0x414]
sub ecx, dword [ebx + 0x410]
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
je 0x437a5f
mov ecx, dword [ebx + 0x410]
add ecx, 0x10
mov edx, dword [ecx]
cmp edx, esi
jbe 0x437a59
mov esi, edx
add ecx, 0x1c
dec eax
jne 0x437a51
add esi, 3
push esi
call fcn.00497a23
mov ecx, dword [ebx + 0x414]
sub ecx, dword [ebx + 0x410]
mov esi, eax
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 4
mov eax, edx
xor edi, edi
shr eax, 0x1f
add esp, 4
add eax, edx
mov dword [esp + 0x14], edi
je 0x437b7c
mov dword [esp + 0x10], edi
lea esp, [esp]
mov eax, dword [ebx + 0x410]
add eax, dword [esp + 0x10]
cmp dword [eax + 0x14], 0x10
jb 0x437ab2
mov eax, dword [eax]
mov edx, esi
sub edx, eax
mov cl, byte [eax]
mov byte [eax + edx], cl
inc eax
test cl, cl
jne 0x437ab6
cmp byte [ebp + 0xc], cl
je 0x437ae5
lea eax, [esi - 1]
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x437ac8
mov cx, word [0x4d5468]
mov word [eax], cx
mov dl, byte [0x4d546a]
mov byte [eax + 2], dl
jmp 0x437af9
lea edi, [esi - 1]
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x437ae8
mov ax, word [0x4d30e4]
mov word [edi], ax
mov eax, esi
lea edx, [eax + 1]
mov edi, edi
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x437b00
mov ecx, dword [esp + 0x1c]
sub eax, edx
cmp ecx, 0xffffffff
je 0x437bdb
push 0
lea edx, [esp + 0x1c]
push edx
push eax
push esi
push ecx
mov dword [esp + 0x2c], 0
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x437bdb
mov eax, dword [esp + 0x18]
xor ecx, ecx
and eax, ecx
cmp eax, 0xffffffff
je 0x437bdb
mov ecx, dword [ebx + 0x414]
sub ecx, dword [ebx + 0x410]
mov edi, dword [esp + 0x14]
add dword [esp + 0x10], 0x1c
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
inc edi
add eax, edx
mov dword [esp + 0x14], edi
cmp edi, eax
jb 0x437aa0
push esi
call fcn.004996ce
mov eax, dword [esp + 0x20]
add esp, 4
cmp eax, 0xffffffff
je 0x437ba2
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp eax, 1
jne 0x437ba2
mov dword [esp + 0x1c], 0xffffffff
cmp dword [esp + 0x34], 8
jb 0x437bb6
mov edx, dword [esp + 0x20]
push edx
call fcn.0049855c
add esp, 4
mov eax, 1
mov ecx, dword [esp + 0x60]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x48]
xor ecx, esp
call fcn.00499155
mov esp, ebp
pop ebp
ret 8
push esi
call fcn.004996ce
mov eax, dword [esp + 0x20]
add esp, 4
cmp eax, 0xffffffff
je 0x437c01
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp eax, 1
jne 0x437c01
mov dword [esp + 0x1c], 0xffffffff
cmp dword [esp + 0x34], 8
jb 0x437a20
mov ecx, dword [esp + 0x20]
push ecx
call fcn.0049855c
add esp, 4
xor eax, eax
jmp 0x437bbb