Function at 0x409090
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0x430
mov eax, dword [0x511014]
xor eax, ebp
mov dword [esp + 0x428], eax
mov dword [ecx], 0x4fefec
lea ebx, [ecx + 8]
mov dword [esp + 4], ecx
add ecx, 0xc
lea esi, [esp + 0x28]
mov dword [esp + 0x10], ecx
push esi
call fcn.00469610
movzx eax, byte [esi + 0xb]
mov ecx, eax
and ecx, 0x7f
mov dword [esp + 0xc], ecx
test al, al
jns 0x4090e4
mov eax, dword [esp + 0x2c]
mov dword [esp + 0xc], eax
jns 0x4090f2
push dword [esp + 0x28]
call fcn.00494aa1
add esp, 4
mov eax, dword [ebx]
mov eax, dword [eax + 4]
mov eax, dword [ebx + eax + 0x1c]
lea ecx, [esp + 0x28]
mov dword [ecx], eax
lock inc dword [eax + 4]
push 0x51613c
call fcn.004881f0
mov edi, eax
mov eax, dword [eax]
mov esi, dword [eax + 0x1c]
mov ecx, esi
call dword [section..00cfg]
mov ecx, edi
push 0xa
call esi
lea ecx, [esp + 0x28]
mov edi, dword [ecx]
xor esi, esi
dec esi
mov ecx, esi
lock xadd dword [edi + 4], ecx
test ecx, ecx
je 0x40925c
movsx eax, al
mov ecx, ebx
push eax
call fcn.004096a0
mov ecx, ebx
call fcn.00409550
lea edi, [esp + 0x1c]
mov dword [edi], esi
mov dword [edi + 4], esi
mov dword [edi + 8], esi
mov ecx, dword [esp + 0x10]
push edi
call fcn.00469610
test byte [0x512f18], 0x19
jne 0x40927c
mov eax, dword [esp + 4]
mov eax, dword [eax + 4]
cmp eax, 3
je 0x4092ae
cmp eax, 2
jge 0x4092b7
call fcn.004be5b0
test al, al
je 0x4091c6
lea eax, [esp + 0x1c]
movzx ecx, byte [eax + 0xb]
mov edx, ecx
and edx, 0x7f
test cl, cl
cmovs edx, dword [eax + 4]
mov dword [esp + 0x28], 0xffffffff
cmovs eax, dword [eax]
push 0
lea ecx, [esp + 0x2c]
push ecx
push edx
push eax
push dword [0x516840]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [esp + 4]
cmp dword [eax + 4], 3
je 0x409302
cmp byte [esp + 0x27], 0
jns 0x4091e7
push dword [esp + 0x1c]
call fcn.00494aa1
add esp, 4
mov edi, dword [esp + 4]
push dword [edi + 0xa0]
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov esi, dword [edi + 0x9c]
call fcn.00494b8d
mov dword [eax], esi
mov eax, dword [edi + 8]
mov eax, dword [eax + 4]
mov dword [edi + eax + 8], 0x4ff708
mov dword [edi + 0xc], 0x4ff710
cmp byte [edi + 0x37], 0
jns 0x40922a
push dword [edi + 0x2c]
call fcn.00494aa1
add esp, 4
add edi, 0x40
mov esi, dword [esp + 0x10]
mov ecx, esi
call fcn.00469510
mov ecx, esi
call fcn.00459370
mov ecx, edi
call fcn.004683c0
mov ecx, dword [esp + 0x428]
xor ecx, ebp
call fcn.00496ce3
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
mov ecx, dword [edi]
mov ecx, dword [ecx + 4]
mov dword [esp + 8], ecx
mov byte [esp], al
call dword [section..00cfg]
mov ecx, edi
call dword [esp + 8]
mov al, byte [esp]
jmp 0x40913c
lea ecx, [esp + 0x14]
mov eax, dword [esp + 4]
mov dword [ecx], eax
mov dword [ecx + 4], edi
xor eax, eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x28], eax
sub esp, 8
movsd xmm0, qword [esp + 0x30]
movsd qword [esp], xmm0
call fcn.004d5200
add esp, 8
jmp 0x409171
cmp byte [0x516858], 0
je 0x40931f
lea ecx, [esp + 0x1c]
movzx eax, byte [ecx + 0xb]
mov ebx, eax
and ebx, 0x7f
test al, al
cmovs ebx, dword [ecx + 4]
cmovs ecx, dword [ecx]
mov dword [esp], ecx
test ebx, ebx
je 0x40918a
xor esi, esi
mov eax, ebx
sub eax, esi
mov ecx, dword [esp]
add ecx, esi
push eax
push ecx
push 2
call fcn.00495b50
add esp, 0xc
test eax, eax
js 0x40918a
add esi, eax
cmp ebx, esi
ja 0x4092da
jmp 0x40918a
mov ecx, dword [0x52113c]
test ecx, ecx
je 0x409378
movzx eax, byte [esp + 0x27]
test al, al
jns 0x40936e
mov edi, dword [esp + 0x1c]
mov eax, dword [esp + 0x20]
jmp 0x409371
mov byte [0x516858], 1
mov eax, dword [0x516860]
mov ecx, dword [0x514f00]
mov edx, dword fs:[0x2c]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x4094c1
mov ecx, dword [esp + 4]
lea edx, [esp + 0x28]
call fcn.004d4eb0
movzx eax, byte [esp + 0x33]
test al, al
jns 0x40941d
mov ecx, dword [esp + 0x28]
mov eax, dword [esp + 0x2c]
jmp 0x409424
and eax, 0x7f
push eax
push edi
call fcn.004d7960
mov esi, 0x400
push esi
push 0xff
lea eax, [esp + 0x30]
push eax
call fcn.00498980
add esp, 0xc
cmp byte [esp + 0x27], 0
jns 0x40939d
mov eax, dword [esp + 0x1c]
jmp 0x4093a1
lea eax, [esp + 0x1c]
push esi
push eax
lea esi, [esp + 0x30]
push esi
call fcn.00492dd0
add esp, 0xc
push esi
call fcn.00459370
add esp, 4
call fcn.004d4dc0
mov eax, dword [0x51684c]
cmp eax, dword [0x516850]
je 0x409504
mov dword [esp + 0x14], 0xffffffff
call fcn.004d4dc0
mov eax, dword [0x516850]
test eax, eax
mov ecx, dword [0x516848]
cmove eax, ecx
dec eax
cmp ecx, eax
jb 0x409507
shl eax, 2
add eax, dword [0x516844]
lea esi, [esp + 0x14]
mov ecx, esi
push eax
call fcn.00493180
cmp dword [esi], 0
jne 0x40945a
lea ecx, [esp + 0x14]
call fcn.00493150
jmp 0x4091d4
and eax, 0x7f
lea ecx, [esp + 0x28]
push eax
push ecx
push dword [0x51685c]
call fcn.00459370
add esp, 0xc
cmp byte [esp + 0x33], 0
jns 0x409447
push dword [esp + 0x28]
call fcn.00494aa1
add esp, 4
mov byte [0x516858], 0
mov eax, dword [esp + 4]
mov eax, dword [eax + 4]
jmp 0x409181
cmp byte [esp + 0x27], 0
jns 0x409467
mov eax, dword [esp + 0x1c]
jmp 0x40946b
lea eax, [esp + 0x1c]
mov dword [esp], eax
mov ebx, dword [esp]
add ebx, dword [esp + 0xc]
je 0x40950a
push ebx
call fcn.004acda0
add esp, 4
mov dword [esp + 8], eax
mov eax, dword [esp + 4]
mov ecx, dword [eax + 0x90]
mov esi, dword [esp + 0xc]
sub esi, ecx
mov edi, dword [esp]
add edi, ecx
mov edx, dword [eax + 0x94]
lea ecx, [esp + 0x14]
push dword [esp + 8]
push ebx
push esi
push edi
push dword [eax + 0x98]
call fcn.004d4e10
add esp, 0x14
jmp 0x40940f
push 0x516860
call fcn.00494ba0
add esp, 4
cmp dword [0x516860], 0xffffffff
jne 0x409347
push 0x400
push str.LOG_FATAL
call fcn.00409690
add esp, 8
mov dword [0x51685c], eax
push 0x516860
call fcn.00495b95
add esp, 4
jmp 0x409347
int3
int3
int3