Function at 0x10004f24
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x35c
mov eax, dword [0x1003a0a0]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
mov ebx, ecx
cmp dword [ebx + 4], 0xffffffff
push esi
push edi
mov dword [ebp - 0x354], ebx
mov dword [ebp - 0x350], eax
je 0x10004f58
mov edi, dword [ebx]
call fcn.100047cc
mov esi, dword [ebx]
mov edi, dword [ebp + 8]
or dword [ebx + 4], 0xffffffff
cmp edi, dword [esi + 4]
jl 0x10004f70
mov eax, 0x10000
jmp 0x100051ac
cmp edi, dword [esi + 0x10]
jge 0x10004f83
call fcn.100041fc
jmp 0x10004f83
mov esi, dword [ebx]
call fcn.10004231
mov eax, dword [ebx]
cmp dword [eax + 0x10], edi
jl 0x10004f7c
mov esi, dword [ebp - 0x354]
push edi
lea ebx, [ebp - 0x348]
mov ecx, esi
call fcn.1000496a
test byte [ebp - 0x240], 0x10
je 0x10004fdc
mov ecx, dword [ebp - 0x350]
mov al, byte [ecx]
cmp al, 0x2f
je 0x10004fc1
cmp al, 0x5c
je 0x10004fc1
test al, al
je 0x10004fc6
cmp byte [ecx + 1], 0x3a
jne 0x10004fc6
push ecx
push 0
jmp 0x10004fce
push ecx
add esi, 0x140
push esi
call fcn.10004e4b
pop ecx
pop ecx
xor eax, eax
jmp 0x100051ac
mov edi, dword [ebp - 0x350]
mov al, byte [edi]
mov ebx, edi
mov ecx, edi
jmp 0x10004ff8
cmp al, 0x2f
je 0x10004ff2
cmp al, 0x5c
jne 0x10004ff5
lea ebx, [ecx + 1]
inc ecx
mov al, byte [ecx]
test al, al
jne 0x10004fea
lea eax, [ebp - 0x110]
push edi
push eax
call fcn.10016aa0
pop ecx
pop ecx
cmp ebx, edi
jne 0x1000507d
mov byte [ebp - 0x110], 0
push ebx
lea eax, [ebp - 0x110]
push eax
lea edi, [esi + 0x140]
push edi
lea eax, [ebp - 0x218]
push str._s_s_s
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x14
lea eax, [ebp - 0x110]
push eax
push edi
call fcn.10004e4b
pop ecx
pop ecx
xor eax, eax
push eax
push dword [ebp - 0x240]
push 2
push eax
push eax
push 0x40000000
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x350], eax
cmp eax, 0xffffffff
jne 0x100050e5
mov eax, 0x200
jmp 0x100051ac
mov eax, ebx
sub eax, edi
mov byte [ebp + eax - 0x110], 0
cmp byte [ebp - 0x110], 0x2f
je 0x100050b5
cmp byte [ebp - 0x110], 0x5c
je 0x100050b5
cmp byte [ebp - 0x110], 0
je 0x10005016
cmp byte [ebp - 0x10f], 0x3a
jne 0x10005016
push ebx
lea eax, [ebp - 0x110]
push eax
lea eax, [ebp - 0x218]
push str._s_s
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
lea eax, [ebp - 0x110]
push eax
push 0
call fcn.10004e4b
add esp, 0x18
jmp 0x10005049
push dword [esi + 0x138]
mov ebx, dword [esi]
call fcn.10004445
xor ebx, ebx
pop ecx
cmp dword [esi + 0x13c], ebx
jne 0x1000510e
push 0x4000
call fcn.1001614f
pop ecx
mov dword [esi + 0x13c], eax
lea eax, [ebp - 0x349]
push eax
push dword [esi + 0x13c]
mov eax, dword [esi]
mov ecx, 0x4000
call fcn.1000459a
mov edi, eax
pop ecx
pop ecx
cmp edi, 0xffffff96
je 0x10005168
cmp edi, ebx
jl 0x10005161
jle 0x10005155
push ebx
lea eax, [ebp - 0x358]
push eax
push edi
push dword [esi + 0x13c]
push dword [ebp - 0x350]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x1000516f
cmp byte [ebp - 0x349], bl
jne 0x10005176
cmp edi, ebx
jne 0x1000510e
mov ebx, 0x5000000
jmp 0x10005197
mov ebx, 0x1000
jmp 0x10005197
mov ebx, 0x400
jmp 0x10005197
lea eax, [ebp - 0x22c]
push eax
lea eax, [ebp - 0x23c]
push eax
lea eax, [ebp - 0x234]
push eax
push dword [ebp - 0x350]
call dword [sym.imp.KERNEL32.dll_SetFileTime]
push dword [ebp - 0x350]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, dword [esi]
call fcn.100047cc
mov eax, ebx
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.10016165
leave
ret 8