Function at 0x430870
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x820
mov eax, dword [0x4f6cdc]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
xor esi, esi
mov edi, ecx
push 0x3fe
lea ecx, [ebp - 0x402]
xor eax, eax
push esi
push ecx
mov dword [ebp - 0x81c], edi
mov dword [ebp - 0x808], esi
mov dword [ebp - 0x810], esi
mov dword [ebp - 0x80c], esi
mov dword [ebp - 0x814], esi
mov word [ebp - 0x404], ax
call fcn.0049eae0
push 0x3fe
lea eax, [ebp - 0x802]
xor edx, edx
push esi
push eax
mov word [ebp - 0x804], dx
call fcn.0049eae0
mov edx, dword [edi]
mov eax, dword [edx + 4]
add esp, 0x18
mov ecx, edi
xor ebx, ebx
mov dword [ebp - 0x818], esi
call eax
test al, al
je 0x430ad9
lea eax, [edi + 4]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, si
jne 0x430900
sub eax, edx
sar eax, 1
jne 0x430938
pop edi
pop esi
mov eax, 8
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0049f71b
mov esp, ebp
pop ebp
ret
mov edi, dword [ebp - 0x81c]
xor esi, esi
lea ecx, [ebp - 0x818]
push ecx
lea edx, [ebp - 0x80c]
push edx
lea eax, [ebp - 0x810]
push eax
mov eax, dword [ebp - 0x814]
lea ecx, [ebp - 0x808]
push ecx
lea edx, [ebp - 0x804]
push edx
push eax
call fcn.0049ac50
add esp, 0x18
cmp eax, esi
jne 0x430ac1
lea eax, [edi + 4]
lea edx, [ebp - 0x404]
mov dword [ebp - 0x820], esi
sub edx, eax
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
cmp cx, si
jne 0x430983
lea eax, [ebp - 0x804]
mov edx, eax
lea ebx, [ebx]
mov cx, word [eax]
add eax, 2
cmp cx, si
jne 0x4309a0
lea edi, [ebp - 0x404]
sub eax, edx
add edi, 0xfffffffe
mov cx, word [edi + 2]
add edi, 2
cmp cx, si
jne 0x4309b6
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
xor edi, edi
cmp dword [ebp - 0x818], edi
je 0x430a66
push edi
push 0x80
push 2
push edi
push 2
push 0x40000000
lea ecx, [ebp - 0x404]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x430a20
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ebx, [eax - 3]
neg ebx
sbb ebx, ebx
and ebx, 3
push esi
add ebx, 6
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x430a78
mov eax, dword [ebp - 0x810]
push edi
lea edx, [ebp - 0x820]
push edx
mov edx, dword [ebp - 0x80c]
add edx, dword [ebp - 0x808]
push eax
push edx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x430a5b
call dword [sym.imp.KERNEL32.dll_GetLastError]
push esi
mov ebx, 4
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x430a78
push esi
xor ebx, ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x430a78
mov ecx, dword [ebp - 0x81c]
lea eax, [ebp - 0x404]
push eax
call fcn.00430670
mov eax, dword [ebp - 0x808]
inc dword [ebp - 0x814]
mov dword [ebp - 0x810], edi
mov dword [ebp - 0x80c], edi
cmp eax, edi
je 0x430a9d
push eax
call fcn.0049acf0
add esp, 4
mov dword [ebp - 0x808], edi
cmp ebx, edi
je 0x430930
pop edi
pop esi
mov eax, 9
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0049f71b
mov esp, ebp
pop ebp
ret
cmp eax, 2
jne 0x430aab
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0049f71b
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
mov eax, 7
pop ebx
call fcn.0049f71b
mov esp, ebp
pop ebp
ret