Function at 0x43ec80
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x660
mov eax, dword [0x54c1b4]
xor eax, ebp
mov dword [ebp - 8], eax
push ebx
push esi
push edi
mov edi, dword [ebp + 0x10]
mov ebx, ecx
mov esi, edx
mov dword [ebp - 0x658], ebx
mov dword [ebp - 0x654], esi
cmp edi, 3
je 0x43ecd8
cmp edi, 2
je 0x43ee02
cmp edi, 1
je 0x43ee02
mov eax, 0x10000
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.004bb4e3
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [ebx + 4]
mov ecx, dword [ebp + 8]
cmp ecx, eax
je 0x43ed8c
cmp eax, 0xffffffff
je 0x43ecf5
mov edi, dword [ebx]
call fcn.0043e090
mov ecx, dword [ebp + 8]
mov esi, dword [ebx]
mov dword [ebx + 4], 0xffffffff
cmp ecx, dword [esi + 4]
jge 0x43ecc0
cmp ecx, dword [esi + 0x10]
jge 0x43ed10
call fcn.0043d730
mov ecx, dword [ebp + 8]
mov eax, dword [ebx]
cmp dword [eax + 0x10], ecx
jge 0x43ed67
mov esi, dword [ebx]
test esi, esi
je 0x43ed5d
cmp dword [esi + 0x18], 0
je 0x43ed5d
mov eax, dword [esi + 0x10]
inc eax
cmp eax, dword [esi + 4]
je 0x43ed5d
mov ecx, dword [esi + 0x50]
add ecx, dword [esi + 0x4c]
mov edx, dword [esi + 0x48]
push 0
lea ecx, [ecx + edx + 0x2e]
add dword [esi + 0x14], ecx
mov dword [esi + 0x10], eax
push 0
lea edx, [esi + 0x78]
push edx
lea eax, [esi + 0x28]
push eax
mov eax, esi
call fcn.0043d310
add esp, 0x10
neg eax
sbb eax, eax
inc eax
mov dword [esi + 0x18], eax
mov ecx, dword [ebx]
mov edx, dword [ebp + 8]
cmp dword [ecx + 0x10], edx
jl 0x43ed17
mov eax, dword [ebx + 0x23c]
mov ebx, dword [ebx]
push eax
call fcn.0043dbe0
mov edx, dword [ebp - 0x658]
mov ecx, dword [ebp + 8]
mov esi, dword [ebp - 0x654]
add esp, 4
mov dword [edx + 4], ecx
mov ebx, edx
mov ecx, dword [ebp + 0xc]
lea eax, [ebp - 0x64d]
push eax
mov eax, dword [ebx]
push esi
call fcn.0043dd50
mov esi, eax
add esp, 8
test esi, esi
jg 0x43edb5
mov edi, dword [ebx]
call fcn.0043e090
mov dword [ebx + 4], 0xffffffff
cmp byte [ebp - 0x64d], 0
jne 0x43ef08
test esi, esi
jle 0x43edde
mov eax, 0x600
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.004bb4e3
mov esp, ebp
pop ebp
ret 0xc
lea eax, [esi + 0x6a]
neg eax
sbb eax, eax
and eax, 0x4fff000
add eax, 0x1000
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.004bb4e3
mov esp, ebp
pop ebp
ret 0xc
cmp dword [ebx + 4], 0xffffffff
je 0x43ee12
mov edi, dword [ebx]
call fcn.0043e090
mov edi, dword [ebp + 0x10]
mov eax, dword [ebx]
mov ecx, dword [ebp + 8]
mov dword [ebx + 4], 0xffffffff
cmp ecx, dword [eax + 4]
jge 0x43ecc0
cmp ecx, dword [eax + 0x10]
jge 0x43ee3f
mov esi, eax
call fcn.0043d730
mov esi, dword [ebp - 0x654]
mov edi, dword [ebp + 0x10]
mov ecx, dword [ebp + 8]
mov edx, dword [ebx]
cmp dword [edx + 0x10], ecx
jge 0x43ee9f
mov esi, dword [ebx]
test esi, esi
je 0x43ee8f
cmp dword [esi + 0x18], 0
je 0x43ee8f
mov eax, dword [esi + 0x10]
inc eax
cmp eax, dword [esi + 4]
je 0x43ee8f
mov ecx, dword [esi + 0x50]
add ecx, dword [esi + 0x4c]
mov edx, dword [esi + 0x48]
push 0
lea ecx, [ecx + edx + 0x2e]
add dword [esi + 0x14], ecx
mov dword [esi + 0x10], eax
push 0
lea edx, [esi + 0x78]
push edx
lea eax, [esi + 0x28]
push eax
mov eax, esi
call fcn.0043d310
mov ecx, dword [ebp + 8]
add esp, 0x10
neg eax
sbb eax, eax
inc eax
mov dword [esi + 0x18], eax
mov edx, dword [ebx]
cmp dword [edx + 0x10], ecx
jl 0x43ee46
mov esi, dword [ebp - 0x654]
mov edi, dword [ebp + 0x10]
push ecx
lea edx, [ebp - 0x64c]
mov ecx, ebx
call fcn.0043e370
mov eax, dword [ebp - 0x440]
shr eax, 4
test al, 1
je 0x43ef1d
cmp edi, 1
je 0x43ef08
movzx eax, word [esi]
cmp eax, 0x2f
je 0x43eed8
cmp eax, 0x5c
je 0x43eed8
test ax, ax
je 0x43eef8
cmp word [esi + 2], 0x3a
jne 0x43eef8
push esi
push 0
call fcn.0043eb00
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.004bb4e3
mov esp, ebp
pop ebp
ret 0xc
push esi
add ebx, 0x244
push ebx
call fcn.0043eb00
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.004bb4e3
mov esp, ebp
pop ebp
ret 0xc
xor ecx, ecx
mov word [ebp - 0x41c], cx
cmp edi, 1
jne 0x43ef36
mov dword [ebp - 0x654], esi
jmp 0x43efd9
movzx eax, word [esi]
mov edi, esi
mov ecx, esi
test ax, ax
je 0x43ef5d
cmp ax, 0x2f
je 0x43ef4e
cmp ax, 0x5c
jne 0x43ef51
lea edi, [ecx + 2]
movzx eax, word [ecx + 2]
add ecx, 2
test ax, ax
jne 0x43ef42
push 0x104
lea edx, [ebp - 0x214]
push esi
push edx
call fcn.004be66b
add esp, 0xc
cmp edi, esi
jne 0x43effe
xor eax, eax
mov word [ebp - 0x214], ax
push edi
lea edx, [ebp - 0x214]
push edx
lea esi, [ebx + 0x244]
push esi
push str._s_s_s
lea edx, [ebp - 0x41c]
call fcn.0043fa70
lea eax, [ebp - 0x214]
push eax
push esi
call fcn.0043eb00
add esp, 0x18
mov ecx, dword [ebp - 0x440]
push 0
push ecx
push 2
push 0
push 0
push 0x40000000
lea edx, [ebp - 0x41c]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x654], eax
cmp dword [ebp - 0x654], 0xffffffff
jne 0x43f069
mov eax, 0x200
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.004bb4e3
mov esp, ebp
pop ebp
ret 0xc
mov ecx, edi
sub ecx, esi
sar ecx, 1
xor edx, edx
mov word [ebp + ecx*2 - 0x214], dx
mov ax, word [ebp - 0x214]
cmp ax, 0x2f
je 0x43f038
cmp ax, 0x5c
je 0x43f038
test ax, ax
je 0x43ef83
cmp word [ebp - 0x212], 0x3a
jne 0x43ef83
push edi
lea eax, [ebp - 0x214]
push eax
push 0x5114fc
lea edx, [ebp - 0x41c]
call fcn.0043fa70
add esp, 0xc
lea ecx, [ebp - 0x214]
push ecx
push 0
call fcn.0043eb00
add esp, 8
jmp 0x43efb2
mov eax, dword [ebx + 0x23c]
mov ebx, dword [ebx]
push eax
call fcn.0043dbe0
mov ebx, dword [ebp - 0x658]
add esp, 4
cmp dword [ebx + 0x240], 0
jne 0x43f09c
push 0x4000
call fcn.00475003
add esp, 4
mov dword [ebx + 0x240], eax
mov esi, dword [sym.imp.KERNEL32.dll_WriteFile]
mov dword [ebp - 0x658], 0
lea esp, [esp]
mov edx, dword [ebx + 0x240]
mov eax, dword [ebx]
lea ecx, [ebp - 0x64d]
push ecx
push edx
mov ecx, 0x4000
call fcn.0043dd50
mov edi, eax
add esp, 8
cmp edi, 0xffffff96
je 0x43f172
test edi, edi
js 0x43f10d
jle 0x43f100
mov ecx, dword [ebx + 0x240]
mov edx, dword [ebp - 0x654]
push 0
lea eax, [ebp - 0x65c]
push eax
push edi
push ecx
push edx
call esi
test eax, eax
je 0x43f17e
cmp byte [ebp - 0x64d], 0
jne 0x43f117
test edi, edi
jne 0x43f0b0
mov dword [ebp - 0x658], 0x5000000
mov edi, dword [ebx]
call fcn.0043e090
mov esi, dword [ebp - 0x658]
test esi, esi
jne 0x43f14a
lea eax, [ebp - 0x42c]
push eax
mov eax, dword [ebp - 0x654]
lea ecx, [ebp - 0x43c]
push ecx
lea edx, [ebp - 0x434]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_SetFileTime]
cmp dword [ebp + 0x10], 1
je 0x43f15d
mov ecx, dword [ebp - 0x654]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 8]
pop edi
mov eax, esi
pop esi
xor ecx, ebp
pop ebx
call fcn.004bb4e3
mov esp, ebp
pop ebp
ret 0xc
mov dword [ebp - 0x658], 0x1000
jmp 0x43f117
mov dword [ebp - 0x658], 0x400
jmp 0x43f117