Function at 0x43580f
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x654
mov eax, dword [0x6c45ac]
xor eax, esp
mov dword [esp + 0x650], eax
mov eax, dword [ebp + 0x14]
push ebx
push esi
mov esi, ecx
mov dword [esp + 0x10], esi
push edi
mov edi, dword [ebp + 0xc]
cmp eax, 3
je 0x435854
cmp eax, 2
je 0x43584b
cmp eax, 1
jne 0x43591c
cmp eax, 3
jne 0x435901
mov ebx, dword [ebp + 8]
cmp ebx, dword [esi + 4]
je 0x4358a0
cmp dword [esi + 4], 0xffffffff
je 0x435869
mov ecx, dword [esi]
call fcn.00434f9e
mov ecx, dword [esi]
or dword [esi + 4], 0xffffffff
cmp ebx, dword [ecx + 4]
jge 0x43591c
cmp dword [ecx + 0x10], ebx
jle 0x435890
call fcn.00434953
jmp 0x43588b
mov ecx, dword [esi]
call fcn.0043498a
mov ecx, dword [esi]
cmp dword [ecx + 0x10], ebx
jl 0x435884
mov edx, dword [esi + 0x23c]
call fcn.00434c17
mov dword [esi + 4], ebx
mov ecx, dword [esi]
lea eax, [esp + 0xf]
push eax
push dword [ebp + 0x10]
mov edx, edi
call fcn.00434d6b
mov edi, eax
pop ecx
pop ecx
test edi, edi
jg 0x4358c4
mov ecx, dword [esi]
call fcn.00434f9e
or dword [esi + 4], 0xffffffff
cmp byte [esp + 0xf], 0
jne 0x43595c
test edi, edi
jle 0x4358ef
mov eax, 0x600
mov ecx, dword [esp + 0x65c]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00590be8
mov esp, ebp
pop ebp
ret 0x10
cmp edi, 0xffffff96
mov eax, 0x5000000
mov ecx, 0x1000
cmove eax, ecx
jmp 0x4358d8
cmp dword [esi + 4], 0xffffffff
je 0x43590e
mov ecx, dword [esi]
call fcn.00434f9e
mov eax, dword [esi]
or dword [esi + 4], 0xffffffff
mov ebx, dword [ebp + 8]
cmp ebx, dword [eax + 4]
jl 0x435923
mov eax, 0x10000
jmp 0x4358d8
cmp dword [eax + 0x10], ebx
jle 0x43593d
mov ecx, eax
call fcn.00434953
jmp 0x435938
mov ecx, dword [esi]
call fcn.0043498a
mov eax, dword [esi]
cmp dword [eax + 0x10], ebx
jl 0x435931
lea eax, [esp + 0x18]
mov ecx, esi
push eax
push ebx
call fcn.0043518f
test byte [esp + 0x224], 0x10
je 0x43598f
cmp dword [ebp + 0x14], 1
jne 0x435963
xor eax, eax
jmp 0x4358d8
movzx eax, word [edi]
cmp eax, 0x2f
je 0x435984
cmp eax, 0x5c
je 0x435984
test ax, ax
je 0x43597c
cmp word [edi + 2], 0x3a
je 0x435984
lea ecx, [esi + 0x244]
jmp 0x435986
xor ecx, ecx
mov edx, edi
call fcn.00435715
jmp 0x43595c
xor ebx, ebx
cmp dword [ebp + 0x14], 1
je 0x435ab5
movzx eax, word [edi]
mov ecx, edi
mov dword [esp + 0x10], edi
test ax, ax
je 0x4359d5
push 0x5c
pop ebx
push 0x2f
mov edx, eax
pop esi
cmp dx, si
je 0x4359bb
cmp dx, bx
jne 0x4359c2
lea eax, [ecx + 2]
mov dword [esp + 0x10], eax
add ecx, 2
movzx eax, word [ecx]
mov edx, eax
test ax, ax
jne 0x4359b1
mov esi, dword [esp + 0x14]
xor ebx, ebx
lea eax, [esp + 0x248]
push edi
push eax
call fcn.005b9a4c
pop ecx
pop ecx
mov ecx, dword [esp + 0x10]
cmp ecx, edi
jne 0x4359f9
xor eax, eax
mov word [esp + 0x248], ax
jmp 0x435a3d
mov eax, ecx
sub eax, edi
and eax, 0xfffffffe
cmp eax, 0x208
jae 0x435b88
xor edx, edx
mov word [esp + eax + 0x248], dx
mov ax, word [esp + 0x248]
push 0x2f
pop edx
cmp ax, dx
je 0x435a65
push 0x5c
pop edx
cmp ax, dx
je 0x435a65
test ax, ax
je 0x435a3d
cmp word [esp + 0x24a], 0x3a
je 0x435a65
push ecx
lea eax, [esp + 0x24c]
push eax
lea edi, [esi + 0x244]
push edi
lea eax, [esp + 0x45c]
push str._s_s_s
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x14
jmp 0x435a86
push ecx
lea eax, [esp + 0x24c]
push eax
lea eax, [esp + 0x458]
push 0x62ad10
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x10
mov edi, ebx
lea edx, [esp + 0x248]
mov ecx, edi
call fcn.00435715
push ebx
push dword [esp + 0x228]
lea eax, [esp + 0x458]
push 2
push ebx
push ebx
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
jne 0x435ac4
mov eax, 0x200
jmp 0x4358d8
mov edx, dword [esi + 0x23c]
mov ecx, dword [esi]
call fcn.00434c17
cmp dword [esi + 0x240], ebx
jne 0x435aea
push 0x4000
call fcn.00591388
pop ecx
mov dword [esi + 0x240], eax
mov edx, dword [esi + 0x240]
lea eax, [esp + 0xf]
mov ecx, dword [esi]
push eax
push 0x4000
call fcn.00434d6b
mov dword [esp + 0x1c], eax
pop ecx
pop ecx
cmp eax, 0xffffff96
je 0x435b68
test eax, eax
js 0x435b39
jle 0x435b2e
push ebx
lea ecx, [esp + 0x14]
push ecx
push eax
push dword [esi + 0x240]
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x435b40
mov eax, dword [esp + 0x14]
cmp byte [esp + 0xf], 0
jne 0x435b47
test eax, eax
jne 0x435aea
mov ebx, 0x5000000
jmp 0x435b6d
mov ebx, 0x400
jmp 0x435b6d
lea eax, [esp + 0x238]
push eax
lea eax, [esp + 0x22c]
push eax
lea eax, [esp + 0x238]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_SetFileTime]
jmp 0x435b6d
mov ebx, 0x1000
cmp dword [ebp + 0x14], 1
je 0x435b7a
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esi]
call fcn.00434f9e
mov eax, ebx
jmp 0x4358d8
call fcn.00590d58
int3