Function at 0x430070
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x4340
call fcn.004e8030
mov eax, dword [0x5a0800]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
mov edi, ecx
mov ecx, dword [ebp + 0x14]
cmp ecx, 3
je 0x4300e0
cmp ecx, 2
je 0x4300e0
cmp ecx, 1
jne 0x4300c8
mov eax, dword [edi + 4]
cmp eax, 0xffffffff
je 0x4300b3
push dword [edi]
call fcn.00432e60
add esp, 4
mov eax, dword [edi]
mov esi, dword [ebp + 8]
mov dword [edi + 4], 0xffffffff
cmp esi, dword [eax + 4]
jl 0x43019a
pop edi
pop esi
mov eax, 0x10000
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004e6d11
mov esp, ebp
pop ebp
ret 0x10
mov eax, dword [edi + 4]
cmp ecx, 3
jne 0x4300a4
mov esi, dword [ebp + 8]
cmp esi, eax
je 0x43013d
cmp eax, 0xffffffff
je 0x4300fe
push dword [edi]
call fcn.00432e60
add esp, 4
mov eax, dword [edi]
mov dword [edi + 4], 0xffffffff
cmp esi, dword [eax + 4]
jge 0x4300c8
cmp esi, dword [eax + 0x10]
jge 0x43011a
push eax
call fcn.00433050
add esp, 4
mov eax, dword [edi]
cmp dword [eax + 0x10], esi
jge 0x430131
push eax
call fcn.004330a0
mov eax, dword [edi]
add esp, 4
cmp dword [eax + 0x10], esi
jl 0x430121
push eax
call fcn.00433270
add esp, 4
mov dword [edi + 4], esi
push dword [ebp + 0x10]
push ebx
push dword [edi]
call fcn.00433540
mov esi, eax
add esp, 0xc
test esi, esi
jle 0x430169
pop edi
pop esi
mov eax, 0x600
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004e6d11
mov esp, ebp
pop ebp
ret 0x10
push dword [edi]
call fcn.00432e60
add esp, 4
mov dword [edi + 4], 0xffffffff
test esi, esi
je 0x43020c
pop edi
pop esi
mov eax, 0x5000000
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004e6d11
mov esp, ebp
pop ebp
ret 0x10
cmp esi, dword [eax + 0x10]
jge 0x4301a8
push eax
call fcn.00433050
add esp, 4
mov eax, dword [edi]
cmp dword [eax + 0x10], esi
jge 0x4301c0
nop
push eax
call fcn.004330a0
mov eax, dword [edi]
add esp, 4
cmp dword [eax + 0x10], esi
jl 0x4301b0
lea eax, [ebp - 0x4338]
mov ecx, edi
push eax
push esi
call fcn.0042f8b0
test byte [ebp - 0x4230], 0x10
je 0x430221
cmp dword [ebp + 0x14], 1
je 0x43020c
push 0x103
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x4334]
push eax
call fcn.0042fda0
lea eax, [ebp - 0x20c]
push eax
lea eax, [edi + 0x138]
push eax
call fcn.0042f3c0
add esp, 0x14
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004e6d11
mov esp, ebp
pop ebp
ret 0x10
cmp dword [ebp + 0x14], 1
je 0x430341
movzx eax, word [ebx]
mov edx, ebx
mov ecx, ebx
test ax, ax
je 0x430325
mov esi, eax
nop dword [eax]
cmp si, 0x2f
je 0x430251
cmp si, 0x5c
je 0x430251
add ecx, 2
jmp 0x430256
lea edx, [ecx + 2]
mov ecx, edx
movzx eax, word [ecx]
mov esi, eax
test ax, ax
jne 0x430240
cmp edx, ebx
je 0x430325
lea esi, [ebp - 0x20c]
mov ecx, ebx
sub esi, ebx
movzx eax, word [ecx]
lea ecx, [ecx + 2]
mov word [esi + ecx - 2], ax
test ax, ax
jne 0x430272
sub edx, ebx
sar edx, 1
lea edx, [edx*2 - 2]
cmp edx, 0x208
jae 0x430432
xor eax, eax
mov word [ebp + edx - 0x20c], ax
mov ax, word [ebp - 0x20c]
cmp ax, 0x2f
je 0x4302c7
cmp ax, 0x5c
je 0x4302c7
cmp word [ebp - 0x20a], 0x3a
mov byte [ebp - 0x4339], 0
jne 0x4302ce
mov byte [ebp - 0x4339], 1
lea eax, [ebp - 0x20c]
push 0x560a5c
push eax
call fcn.004eacd9
mov esi, eax
lea eax, [ebp - 0x20c]
push 0x560a64
push eax
call fcn.004eacd9
movzx ecx, byte [ebp - 0x4339]
add esp, 0x10
test eax, eax
mov eax, 1
setne dl
test esi, esi
cmovne ecx, eax
or dl, cl
jne 0x430325
lea eax, [ebp - 0x20c]
push eax
lea eax, [edi + 0x138]
push eax
call fcn.0042f3c0
add esp, 8
push 0
push dword [ebp - 0x4230]
push 2
push 0
push 0
push 0x40000000
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x43035e
pop edi
pop esi
mov eax, 0x200
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004e6d11
mov esp, ebp
pop ebp
ret 0x10
push dword [edi]
call fcn.00433270
push 0x4000
lea eax, [ebp - 0x420c]
mov byte [ebp - 0x4339], 0
push eax
push dword [edi]
call fcn.00433540
add esp, 0x10
test eax, eax
js 0x4303c0
mov esi, dword [sym.imp.KERNEL32.dll_WriteFile]
je 0x4303c7
push 0
lea ecx, [ebp - 0x4340]
push ecx
push eax
lea eax, [ebp - 0x420c]
push eax
push ebx
call esi
test eax, eax
je 0x4303c0
push 0x4000
lea eax, [ebp - 0x420c]
push eax
push dword [edi]
call fcn.00433540
add esp, 0xc
test eax, eax
jns 0x43038c
mov byte [ebp - 0x4339], 1
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileType]
cmp eax, 1
jne 0x4303f8
cmp byte [ebp - 0x4339], 0
jne 0x4303f8
lea eax, [ebp - 0x421c]
push eax
lea eax, [ebp - 0x422c]
push eax
lea eax, [ebp - 0x4224]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_SetFileTime]
cmp dword [ebp + 0x14], 1
je 0x430405
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [edi]
call fcn.00432e60
add esp, 4
xor eax, eax
cmp byte [ebp - 0x4339], al
mov ecx, 0x400
cmovne eax, ecx
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004e6d11
mov esp, ebp
pop ebp
ret 0x10
call fcn.004e7e32
int3