Function at 0x10042b8e
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x650
mov eax, dword [0x100e30c0]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x14]
push ebx
mov ebx, dword [ebp + 0xc]
push esi
mov esi, ecx
mov dword [ebp - 0x650], esi
push edi
cmp eax, 3
je 0x10042bce
cmp eax, 2
je 0x10042bc5
cmp eax, 1
jne 0x10042c9b
cmp eax, 3
jne 0x10042c7f
mov edi, dword [ebp + 8]
cmp edi, dword [esi + 4]
je 0x10042c1f
cmp dword [esi + 4], 0xffffffff
je 0x10042be4
push dword [esi]
call fcn.100455b6
pop ecx
mov eax, dword [esi]
or dword [esi + 4], 0xffffffff
cmp edi, dword [eax + 4]
jge 0x10042c9b
cmp edi, dword [eax + 0x10]
jge 0x10042c07
push eax
call fcn.1004563f
jmp 0x10042c06
push eax
call fcn.1004567e
pop ecx
mov eax, dword [esi]
cmp dword [eax + 0x10], edi
jl 0x10042c00
push dword [esi + 0x23c]
push eax
call fcn.10045788
pop ecx
pop ecx
mov dword [esi + 4], edi
lea eax, [ebp - 0x645]
push eax
push dword [ebp + 0x10]
push ebx
push dword [esi]
call fcn.10045a39
mov edi, eax
add esp, 0x10
test edi, edi
jg 0x10042c46
push dword [esi]
call fcn.100455b6
or dword [esi + 4], 0xffffffff
pop ecx
cmp byte [ebp - 0x645], 0
jne 0x10042cdd
test edi, edi
jle 0x10042c6d
mov eax, 0x600
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.1008702a
leave
ret 0x10
cmp edi, 0xffffff96
mov eax, 0x5000000
mov ecx, 0x1000
cmove eax, ecx
jmp 0x10042c5c
cmp dword [esi + 4], 0xffffffff
je 0x10042c8d
push dword [esi]
call fcn.100455b6
pop ecx
mov eax, dword [esi]
or dword [esi + 4], 0xffffffff
mov edi, dword [ebp + 8]
cmp edi, dword [eax + 4]
jl 0x10042ca2
mov eax, 0x10000
jmp 0x10042c5c
cmp edi, dword [eax + 0x10]
jge 0x10042cb6
push eax
call fcn.1004563f
jmp 0x10042cb5
push eax
call fcn.1004567e
pop ecx
mov eax, dword [esi]
cmp dword [eax + 0x10], edi
jl 0x10042caf
lea eax, [ebp - 0x644]
mov ecx, esi
push eax
push edi
call fcn.100424e2
xor edx, edx
inc edx
test byte [ebp - 0x438], 0x10
je 0x10042d22
cmp dword [ebp + 0x14], edx
jne 0x10042ce4
xor eax, eax
jmp 0x10042c5c
movzx eax, word [ebx]
cmp eax, 0x2f
je 0x10042d0a
cmp eax, 0x5c
je 0x10042d0a
test ax, ax
je 0x10042cfd
cmp word [ebx + 2], 0x3a
je 0x10042d0a
mov byte [ebp - 0x64c], 0
mov edx, dword [ebp - 0x64c]
xor ecx, ecx
lea eax, [esi + 0x244]
test dl, dl
push ebx
cmove ecx, eax
push ecx
call fcn.100422ed
pop ecx
pop ecx
jmp 0x10042cdd
xor edi, edi
cmp dword [ebp + 0x14], edx
je 0x10042e48
movzx eax, word [ebx]
mov ecx, ebx
mov dword [ebp - 0x64c], ebx
test ax, ax
je 0x10042d6f
push 0x5c
pop edi
push 0x2f
mov edx, eax
pop esi
cmp dx, si
je 0x10042d54
cmp word [ecx], di
je 0x10042d54
add ecx, 2
jmp 0x10042d5d
add ecx, 2
mov dword [ebp - 0x64c], ecx
movzx eax, word [ecx]
mov edx, eax
test ax, ax
jne 0x10042d45
mov esi, dword [ebp - 0x650]
xor edi, edi
lea eax, [ebp - 0x20c]
push ebx
push eax
call fcn.1009b517
pop ecx
pop ecx
mov ecx, dword [ebp - 0x64c]
cmp ecx, ebx
jne 0x10042d93
xor eax, eax
mov word [ebp - 0x20c], ax
jmp 0x10042dd5
mov eax, ecx
sub eax, ebx
and eax, 0xfffffffe
cmp eax, 0x208
jae 0x10042f2b
xor edx, edx
mov word [ebp + eax - 0x20c], dx
mov ax, word [ebp - 0x20c]
push 0x2f
pop edx
cmp ax, dx
je 0x10042dfb
push 0x5c
pop edx
cmp ax, dx
je 0x10042dfb
test ax, ax
je 0x10042dd5
cmp word [ebp - 0x20a], 0x3a
je 0x10042dfb
push ecx
lea eax, [ebp - 0x20c]
push eax
lea ebx, [esi + 0x244]
push ebx
lea eax, [ebp - 0x414]
push str._s_s_s
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x14
jmp 0x10042e1a
push ecx
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x414]
push str._s_s
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x10
mov ebx, edi
lea eax, [ebp - 0x20c]
push eax
push ebx
call fcn.100422ed
pop ecx
pop ecx
push edi
push dword [ebp - 0x438]
lea eax, [ebp - 0x414]
push 2
push edi
push edi
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x10042e57
mov eax, 0x200
jmp 0x10042c5c
push dword [esi + 0x23c]
push dword [esi]
call fcn.10045788
pop ecx
pop ecx
cmp dword [esi + 0x240], edi
jne 0x10042e7f
push 0x4000
call fcn.100875b8
pop ecx
mov dword [esi + 0x240], eax
lea eax, [ebp - 0x645]
push eax
push 0x4000
push dword [esi + 0x240]
push dword [esi]
call fcn.10045a39
add esp, 0x10
mov dword [ebp - 0x650], eax
cmp eax, 0xffffff96
je 0x10042f05
test eax, eax
js 0x10042ed9
jle 0x10042ecc
push edi
lea ecx, [ebp - 0x64c]
push ecx
push eax
push dword [esi + 0x240]
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x10042ee0
mov eax, dword [ebp - 0x650]
cmp byte [ebp - 0x645], 0
jne 0x10042ee7
test eax, eax
jne 0x10042e7f
mov edi, 0x5000000
jmp 0x10042f0a
mov edi, 0x400
jmp 0x10042f0a
lea eax, [ebp - 0x424]
push eax
lea eax, [ebp - 0x434]
push eax
lea eax, [ebp - 0x42c]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_SetFileTime]
jmp 0x10042f0a
mov edi, 0x1000
cmp dword [ebp + 0x14], 1
je 0x10042f17
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [esi]
call fcn.100455b6
xor eax, eax
test edi, edi
pop ecx
cmovne eax, edi
jmp 0x10042c5c
call fcn.10087191
int3