Function at 0x10008d55
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x55c
mov eax, dword [0x1001f0b0]
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 0x10008d91
mov ebx, dword [edi]
call fcn.100084ec
mov eax, dword [edi]
mov ebx, dword [ebp + 8]
or dword [edi + 4], 0xffffffff
cmp ebx, dword [eax + 4]
jl 0x10008da9
mov eax, 0x10000
jmp 0x1000908b
cmp ebx, dword [eax + 0x10]
jge 0x10008dbb
mov esi, eax
call fcn.10007f1f
mov esi, dword [ebp - 0x554]
mov eax, dword [edi]
cmp dword [eax + 0x10], ebx
jge 0x10008dd6
mov esi, dword [edi]
call fcn.10007f54
mov eax, dword [edi]
cmp dword [eax + 0x10], ebx
jl 0x10008dc2
mov esi, dword [ebp - 0x554]
push ebx
lea edx, [ebp - 0x548]
mov ecx, edi
call fcn.10008672
mov eax, dword [ebp - 0x440]
shr eax, 4
test al, 1
mov al, byte [esi]
je 0x10008e20
cmp al, 0x2f
je 0x10008e05
cmp al, 0x5c
je 0x10008e05
test al, al
je 0x10008e0a
cmp byte [esi + 1], 0x3a
jne 0x10008e0a
push esi
push 0
jmp 0x10008e12
push esi
add edi, 0x140
push edi
call fcn.10008c07
pop ecx
pop ecx
xor eax, eax
jmp 0x1000908b
mov byte [ebp - 0x218], 0
mov ebx, esi
mov ecx, esi
jmp 0x10008e3b
cmp al, 0x2f
je 0x10008e35
cmp al, 0x5c
jne 0x10008e38
lea ebx, [ecx + 1]
inc ecx
mov al, byte [ecx]
test al, al
jne 0x10008e2d
push 0x104
lea eax, [ebp - 0x110]
push esi
push eax
call fcn.1000b8fb
add esp, 0xc
cmp ebx, esi
jne 0x10008ef4
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.1000c780
add esp, 0xc
mov esi, 0x1001b788
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.1000c780
add esp, 0xc
lea eax, [ebp - 0x418]
push eax
lea eax, [ebp - 0x318]
push 0xff
push eax
call fcn.1000b3bd
add esp, 0xc
lea eax, [ebp - 0x318]
push eax
push ebx
call fcn.1000b000
mov esi, dword [ebp - 0x54c]
pop ecx
add esi, 0x140
test eax, eax
pop ecx
lea eax, [ebp - 0x110]
je 0x10008f59
push dword [ebp - 0x558]
jmp 0x10008f5a
mov eax, ebx
sub eax, esi
mov byte [ebp + eax - 0x110], 0
cmp byte [ebp - 0x110], 0x2f
je 0x10008f2c
cmp byte [ebp - 0x110], 0x5c
je 0x10008f2c
cmp byte [ebp - 0x110], 0
je 0x10008e63
cmp byte [ebp - 0x10f], 0x3a
jne 0x10008e63
push ebx
lea eax, [ebp - 0x110]
push eax
lea eax, [ebp - 0x218]
push str._s_s
push eax
call fcn.1000a7f0
lea eax, [ebp - 0x110]
push eax
xor esi, esi
push esi
call fcn.10008c07
add esp, 0x18
jmp 0x10008f87
push ebx
push eax
push esi
lea eax, [ebp - 0x218]
push str._s_s_s
push eax
call fcn.1000a7f0
add esp, 0x14
lea eax, [ebp - 0x110]
push eax
push esi
call fcn.10008c07
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 0x10008fb9
mov eax, 0x200
jmp 0x1000908b
push dword [edi + 0x138]
mov eax, dword [edi]
call fcn.10008168
pop ecx
cmp dword [edi + 0x13c], esi
jne 0x10008fe0
push 0x4000
call fcn.1000b7a8
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.100082c1
mov ebx, eax
pop ecx
pop ecx
cmp ebx, 0xffffff96
je 0x1000909c
cmp ebx, esi
jl 0x1000903e
jle 0x10009031
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 0x100090a8
cmp byte [ebp - 0x54d], 0
jne 0x10009048
cmp ebx, esi
jne 0x10008fe6
mov dword [ebp - 0x54c], 0x5000000
mov ebx, dword [edi]
call fcn.100084ec
cmp dword [ebp - 0x54c], 0
jne 0x10009079
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.1000a7e1
leave
ret 8
mov dword [ebp - 0x54c], 0x1000
jmp 0x10009048
mov dword [ebp - 0x54c], 0x400
jmp 0x10009048