Function at 0x10004590
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x124
movzx eax, word [esi + 0x8de]
push ebx
xor ebx, ebx
cmp dword [esi + 2], 0xffffffff
push ebp
push edi
mov dword [esp + 0x20], ebx
mov byte [esp + 0x13], bl
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x28], eax
mov word [esi + 0x8de], bx
jne 0x100045c8
mov edi, dword [esi + 6]
jmp 0x100045ca
xor edi, edi
mov ecx, dword [esi + 0x1c]
mov edx, dword [esi + 0x4c]
mov ax, word [esi + 0x70]
and ecx, 0x200
neg ecx
sbb ecx, ecx
and ecx, 0xffffff9c
add ecx, 0xdc
cmp dword [esi + 0x44], ebx
mov word [esi + 0x76], cx
mov dword [esi + 0x78], edx
mov word [esi + 0x84], ax
jne 0x10004627
mov eax, dword [esp + 0x134]
cmp dword [eax + 0x64], ebx
je 0x10004627
mov ecx, dword [eax + 0x60]
push 0x104
lea edx, [esp + 0x30]
call fcn.1000a4c0
mov dword [esp + 0x20], eax
mov word [esi + 0x86], ax
mov byte [esp + 0x13], 1
cmp dword [esi + 0x6c], ebx
je 0x10004650
mov cl, byte [esi + 0x8d8]
mov dl, byte [esi + 0x8da]
mov al, byte [esi + 0x8dc]
mov byte [esi + 0x88], cl
mov byte [esi + 0x89], dl
mov byte [esi + 0x8a], al
cmp edi, ebx
mov ebp, dword [sym.imp.KERNEL32.dll_WriteFile]
je 0x1000468b
mov ecx, dword [esi + 0x74]
mov dword [edi], ecx
mov edx, dword [esi + 0x78]
mov dword [edi + 4], edx
mov eax, dword [esi + 0x7c]
mov dword [edi + 8], eax
mov ecx, dword [esi + 0x80]
mov dword [edi + 0xc], ecx
mov edx, dword [esi + 0x84]
mov dword [edi + 0x10], edx
mov eax, dword [esi + 0x88]
mov dword [edi + 0x14], eax
add edi, 0x18
jmp 0x100046b0
mov eax, dword [esi + 2]
push ebx
lea ecx, [esp + 0x10]
push ecx
push 0x18
lea edx, [esi + 0x74]
push edx
push eax
call ebp
test eax, eax
je 0x10004962
cmp dword [esp + 0xc], 0x18
jne 0x10004962
mov eax, dword [esi + 0x70]
add eax, 1
cmp edi, ebx
mov dword [esp + 0x18], eax
je 0x100046d5
push eax
lea ecx, [esi + 0x8f8]
push ecx
push edi
call fcn.1000ed10
add esp, 0xc
add edi, dword [esp + 0x18]
jmp 0x100046ff
mov ecx, dword [esi + 2]
push ebx
lea edx, [esp + 0x10]
push edx
push eax
lea eax, [esi + 0x8f8]
push eax
push ecx
call ebp
test eax, eax
je 0x10004962
mov edx, dword [esp + 0xc]
cmp edx, dword [esp + 0x18]
jne 0x10004962
mov eax, dword [esp + 0x20]
add eax, 1
cmp edi, ebx
mov dword [esp + 0x18], eax
je 0x10004723
push eax
lea eax, [esp + 0x30]
push eax
push edi
call fcn.1000ed10
add esp, 0xc
add edi, dword [esp + 0x18]
jmp 0x1000474b
push ebx
lea ecx, [esp + 0x10]
push ecx
push eax
mov eax, dword [esi + 2]
lea edx, [esp + 0x38]
push edx
push eax
call ebp
test eax, eax
je 0x10004962
mov ecx, dword [esp + 0xc]
cmp ecx, dword [esp + 0x18]
jne 0x10004962
test dword [esi + 0x1c], 0x200
jne 0x1000498f
cmp edi, ebx
mov edx, dword [esi + 0x64]
lea eax, [edx + edx + 2]
mov dword [esp + 0x18], eax
je 0x10004799
mov dword [edi], 1
mov ecx, dword [esp + 0x18]
mov dword [edi + 4], ecx
mov dword [edi + 8], ebx
mov edx, dword [esp + 0x18]
push edx
lea eax, [esi + 0x4c8]
push eax
lea ecx, [edi + 0xc]
push ecx
call fcn.1000ed10
mov edx, dword [esp + 0x24]
add esp, 0xc
lea edi, [edi + edx + 0xc]
jmp 0x100047f5
mov edx, dword [esi + 2]
push ebx
lea eax, [esp + 0x10]
push eax
push 0xc
lea ecx, [esp + 0x20]
push ecx
push edx
mov dword [esp + 0x28], 1
call ebp
test eax, eax
je 0x10004962
cmp dword [esp + 0xc], 0xc
jne 0x10004962
mov ecx, dword [esp + 0x18]
push ebx
lea eax, [esp + 0x10]
push eax
mov eax, dword [esi + 2]
push ecx
lea edx, [esi + 0x4c8]
push edx
push eax
call ebp
test eax, eax
je 0x10004962
mov ecx, dword [esp + 0xc]
cmp ecx, dword [esp + 0x18]
jne 0x10004962
cmp byte [esp + 0x13], bl
je 0x100048c7
cmp edi, ebx
je 0x1000483b
mov eax, dword [esp + 0x134]
mov edx, dword [eax + 0x64]
mov ecx, dword [eax + 0x60]
add edx, 1
push edx
lea edx, [edi + 0xc]
call fcn.1000a380
add eax, eax
mov dword [esp + 0x18], eax
mov dword [edi + 4], eax
mov dword [edi], 2
mov dword [edi + 8], ebx
mov eax, dword [esp + 0x18]
lea edi, [edi + eax + 0xc]
jmp 0x100048c7
mov ecx, dword [esp + 0x134]
mov edx, dword [ecx + 0x64]
push ebx
lea ecx, [esp + 0x10]
push ecx
lea eax, [edx + edx + 2]
push 0xc
lea edx, [esp + 0x20]
mov dword [esp + 0x24], eax
mov eax, dword [esi + 2]
push edx
push eax
mov dword [esp + 0x28], 2
call ebp
test eax, eax
je 0x10004962
cmp dword [esp + 0xc], 0xc
jne 0x10004962
mov edx, dword [esp + 0x18]
mov eax, dword [esp + 0x134]
push ebx
lea ecx, [esp + 0x10]
push ecx
mov ecx, dword [eax + 0x60]
push edx
call fcn.1000a3f0
mov ecx, dword [esi + 2]
push eax
push ecx
call ebp
mov edx, dword [esp + 0x134]
mov ecx, dword [edx + 0x60]
mov dword [esp + 0x20], eax
call fcn.1000a440
cmp dword [esp + 0x20], ebx
je 0x10004962
mov eax, dword [esp + 0xc]
cmp eax, dword [esp + 0x18]
jne 0x10004962
cmp dword [esi + 0x6c], ebx
je 0x10004908
cmp edi, ebx
mov dword [esp + 0x18], 8
je 0x10004916
mov dword [edi], 3
mov ecx, dword [esp + 0x18]
mov dword [edi + 4], ecx
mov dword [edi + 8], ebx
mov edx, dword [esp + 0x18]
push edx
lea eax, [esi + 0x8d8]
push eax
lea ecx, [edi + 0xc]
push ecx
call fcn.1000ed10
mov edx, dword [esp + 0x24]
add esp, 0xc
lea edi, [edi + edx + 0xc]
cmp edi, ebx
je 0x10004969
mov dword [edi], ebx
mov dword [edi + 4], ebx
mov dword [edi + 8], ebx
jmp 0x1000498f
mov edx, dword [esi + 2]
push ebx
lea eax, [esp + 0x10]
push eax
push 0xc
lea ecx, [esp + 0x20]
push ecx
push edx
mov dword [esp + 0x28], 3
call ebp
test eax, eax
je 0x10004962
cmp dword [esp + 0xc], 0xc
jne 0x10004962
mov ecx, dword [esp + 0x18]
push ebx
lea eax, [esp + 0x10]
push eax
mov eax, dword [esi + 2]
push ecx
lea edx, [esi + 0x8d8]
push edx
push eax
call ebp
test eax, eax
je 0x10004962
mov ecx, dword [esp + 0xc]
cmp ecx, dword [esp + 0x18]
je 0x10004969
mov eax, 0x3307
jmp 0x10004991
mov ecx, dword [esi + 2]
push ebx
lea edx, [esp + 0x10]
push edx
push 0xc
lea eax, [esp + 0x20]
push eax
push ecx
mov dword [esp + 0x28], ebx
mov dword [esp + 0x2c], ebx
call ebp
test eax, eax
je 0x10004962
cmp dword [esp + 0xc], 0xc
jne 0x10004962
mov eax, ebx
mov dx, word [esp + 0x28]
pop edi
pop ebp
mov word [esi + 0x8de], dx
pop ebx
add esp, 0x124
ret 4