Function at 0x10008eec
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x55c
mov eax, dword [0x100200b0]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
push esi
push edi
mov edi, ecx
cmp dword [edi + 4], 0xffffffff
mov esi, edx
mov dword [ebp - 0x54c], edi
mov dword [ebp - 0x554], esi
mov dword [ebp - 0x558], eax
je 0x10008f28
mov ebx, dword [edi]
call fcn.10008683
mov eax, dword [edi]
mov ebx, dword [ebp + 8]
or dword [edi + 4], 0xffffffff
cmp ebx, dword [eax + 4]
jl 0x10008f40
mov eax, 0x10000
jmp 0x10009222
cmp ebx, dword [eax + 0x10]
jge 0x10008f52
mov esi, eax
call fcn.100080b6
mov esi, dword [ebp - 0x554]
mov eax, dword [edi]
cmp dword [eax + 0x10], ebx
jge 0x10008f6d
mov esi, dword [edi]
call fcn.100080eb
mov eax, dword [edi]
cmp dword [eax + 0x10], ebx
jl 0x10008f59
mov esi, dword [ebp - 0x554]
push ebx
lea edx, [ebp - 0x548]
mov ecx, edi
call fcn.10008809
mov eax, dword [ebp - 0x440]
shr eax, 4
test al, 1
mov al, byte [esi]
je 0x10008fb7
cmp al, 0x2f
je 0x10008f9c
cmp al, 0x5c
je 0x10008f9c
test al, al
je 0x10008fa1
cmp byte [esi + 1], 0x3a
jne 0x10008fa1
push esi
push 0
jmp 0x10008fa9
push esi
add edi, 0x140
push edi
call fcn.10008d9e
pop ecx
pop ecx
xor eax, eax
jmp 0x10009222
mov byte [ebp - 0x218], 0
mov ebx, esi
mov ecx, esi
jmp 0x10008fd2
cmp al, 0x2f
je 0x10008fcc
cmp al, 0x5c
jne 0x10008fcf
lea ebx, [ecx + 1]
inc ecx
mov al, byte [ecx]
test al, al
jne 0x10008fc4
push 0x104
lea eax, [ebp - 0x110]
push esi
push eax
call fcn.1000ba8b
add esp, 0xc
cmp ebx, esi
jne 0x1000908b
mov byte [ebp - 0x110], 0
mov esi, str.text.e
lea edi, [ebp - 0x318]
movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
push pe_nt_image_headers32
lea eax, [ebp - 0x311]
push 0
push eax
movsb byte es:[edi], byte [esi]
call fcn.1000c910
add esp, 0xc
mov esi, 0x1001c770
lea edi, [ebp - 0x418]
movsw word es:[edi], word [esi]
push 0xfc
lea eax, [ebp - 0x415]
push 0
push eax
movsb byte es:[edi], byte [esi]
call fcn.1000c910
add esp, 0xc
lea eax, [ebp - 0x418]
push eax
lea eax, [ebp - 0x318]
push 0xff
push eax
call fcn.1000b54d
add esp, 0xc
lea eax, [ebp - 0x318]
push eax
push ebx
call fcn.1000b190
mov esi, dword [ebp - 0x54c]
pop ecx
add esi, 0x140
test eax, eax
pop ecx
lea eax, [ebp - 0x110]
je 0x100090f0
push dword [ebp - 0x558]
jmp 0x100090f1
mov eax, ebx
sub eax, esi
mov byte [ebp + eax - 0x110], 0
cmp byte [ebp - 0x110], 0x2f
je 0x100090c3
cmp byte [ebp - 0x110], 0x5c
je 0x100090c3
cmp byte [ebp - 0x110], 0
je 0x10008ffa
cmp byte [ebp - 0x10f], 0x3a
jne 0x10008ffa
push ebx
lea eax, [ebp - 0x110]
push eax
lea eax, [ebp - 0x218]
push str._s_s
push eax
call fcn.1000a980
lea eax, [ebp - 0x110]
push eax
xor esi, esi
push esi
call fcn.10008d9e
add esp, 0x18
jmp 0x1000911e
push ebx
push eax
push esi
lea eax, [ebp - 0x218]
push str._s_s_s
push eax
call fcn.1000a980
add esp, 0x14
lea eax, [ebp - 0x110]
push eax
push esi
call fcn.10008d9e
mov edi, dword [ebp - 0x54c]
pop ecx
pop ecx
xor esi, esi
push esi
push dword [ebp - 0x440]
lea eax, [ebp - 0x218]
push 2
push esi
push esi
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x554], eax
cmp eax, 0xffffffff
jne 0x10009150
mov eax, 0x200
jmp 0x10009222
push dword [edi + 0x138]
mov eax, dword [edi]
call fcn.100082ff
pop ecx
cmp dword [edi + 0x13c], esi
jne 0x10009177
push 0x4000
call fcn.1000b938
pop ecx
mov dword [edi + 0x13c], eax
mov dword [ebp - 0x54c], esi
lea eax, [ebp - 0x54d]
push eax
push dword [edi + 0x13c]
mov eax, dword [edi]
mov ecx, 0x4000
call fcn.10008458
mov ebx, eax
pop ecx
pop ecx
cmp ebx, 0xffffff96
je 0x10009233
cmp ebx, esi
jl 0x100091d5
jle 0x100091c8
push esi
lea eax, [ebp - 0x558]
push eax
push ebx
push dword [edi + 0x13c]
push dword [ebp - 0x554]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x1000923f
cmp byte [ebp - 0x54d], 0
jne 0x100091df
cmp ebx, esi
jne 0x1000917d
mov dword [ebp - 0x54c], 0x5000000
mov ebx, dword [edi]
call fcn.10008683
cmp dword [ebp - 0x54c], 0
jne 0x10009210
lea eax, [ebp - 0x42c]
push eax
lea eax, [ebp - 0x43c]
push eax
lea eax, [ebp - 0x434]
push eax
push dword [ebp - 0x554]
call dword [sym.imp.KERNEL32.dll_SetFileTime]
push dword [ebp - 0x554]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x54c]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.1000a971
leave
ret 8
mov dword [ebp - 0x54c], 0x1000
jmp 0x100091df
mov dword [ebp - 0x54c], 0x400
jmp 0x100091df