Function at 0x408960
Capabilities:
Write file on windows

Disassembly:
push 0xffffffffffffffff
push 0x493a88
mov eax, dword fs:[0]
push eax
sub esp, 0x30
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4bea30]
xor eax, esp
push eax
lea eax, [esp + 0x44]
mov dword fs:[0], eax
call fcn.0045525d
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x4089a1
push 0x80004005
call fcn.004022b0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x18], eax
lea ecx, [esp + 0x20]
push ecx
mov dword [esp + 0x50], 0
call fcn.0042da50
mov byte [esp + 0x4c], 1
mov ecx, SysReAllocString
mov eax, 0x4a19dc
xor edx, edx
cmp byte [eax], dl
je 0x4089e2
add eax, 1
sub ecx, 1
jne 0x4089d4
jmp 0x4089ea
test ecx, ecx
jne 0x408d02
mov edx, 0x80070057
xor eax, eax
mov ebx, dword [esp + 0x54]
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
xor ecx, ecx
test edx, edx
setl cl
push 0
lea edx, [esp + 0x20]
push edx
sub ecx, 1
and eax, ecx
push eax
push 0x4a19dc
push ebx
call edi
push 0x4a0fdc
lea eax, [esp + 0x1c]
push str.__s_
push eax
call fcn.004045e0
add esp, 0xc
push 2
push 0x4a19ec
lea ecx, [esp + 0x20]
call fcn.00409b30
mov ebp, dword [esp + 0x18]
cmp dword [ebp - 4], 1
mov esi, dword [ebp - 0xc]
jle 0x408a5b
mov ecx, esi
push ecx
lea ecx, [esp + 0x1c]
call fcn.00404510
mov ebp, dword [esp + 0x18]
push 0
lea edx, [esp + 0x20]
push edx
lea eax, [esi + esi]
push eax
push ebp
push ebx
call edi
mov edi, dword [esp + 0x58]
mov eax, dword [edi + 8]
xor ebx, ebx
test eax, eax
jle 0x408cba
call fcn.0045525d
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
je 0x408997
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
lea esi, [eax + 0x10]
mov dword [esp + 0x14], esi
test ebx, ebx
mov byte [esp + 0x4c], 2
jl 0x408d18
cmp ebx, dword [edi + 8]
jge 0x408d18
mov ecx, dword [edi + 4]
mov edx, dword [esp + 0x20]
lea eax, [ecx + ebx*4]
mov eax, dword [eax]
push 0
push 1
push eax
mov eax, dword [edx + 4]
lea ecx, [esp + 0x2c]
call eax
test eax, eax
je 0x408c8d
mov edx, dword [esp + 0x20]
mov eax, dword [edx + 0x14]
push str.Name
push str.Info
lea ecx, [esp + 0x28]
call eax
test eax, eax
je 0x408b18
lea ecx, [esp + 0x18]
push ecx
push 1
lea ecx, [esp + 0x28]
call fcn.0042ec40
test eax, eax
je 0x408b18
lea edx, [esp + 0x18]
push edx
lea ecx, [esp + 0x18]
call fcn.00405560
mov esi, dword [esp + 0x14]
mov ebp, dword [esi - 0xc]
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
lea edi, [ebp + 1]
sub eax, edi
or eax, ecx
jge 0x408b3d
push edi
lea ecx, [esp + 0x18]
call fcn.004044c0
mov esi, dword [esp + 0x14]
test edi, edi
mov word [esi + ebp*2], 0x2c
jl 0x408d0e
cmp edi, dword [esi - 8]
jg 0x408d0e
mov dword [esi - 0xc], edi
mov word [esi + edi*2], 0
mov eax, dword [esp + 0x20]
mov edx, dword [eax + 0x14]
push 0x4a1a0c
push str.Info
lea ecx, [esp + 0x28]
call edx
test eax, eax
je 0x408ba2
lea eax, [esp + 0x18]
push eax
push 1
lea ecx, [esp + 0x28]
call fcn.0042ec40
test eax, eax
je 0x408ba2
mov ecx, dword [esp + 0x18]
mov eax, dword [ecx - 0xc]
push eax
push ecx
lea ecx, [esp + 0x1c]
call fcn.00409b30
mov esi, dword [esp + 0x14]
mov ebp, dword [esi - 0xc]
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
lea edi, [ebp + 1]
sub eax, edi
or eax, ecx
jge 0x408bc7
push edi
lea ecx, [esp + 0x18]
call fcn.004044c0
mov esi, dword [esp + 0x14]
test edi, edi
mov word [esi + ebp*2], 0x2c
jl 0x408d0e
cmp edi, dword [esi - 8]
jg 0x408d0e
mov dword [esi - 0xc], edi
mov word [esi + edi*2], 0
mov edx, dword [esp + 0x20]
mov eax, dword [edx + 0x14]
push str.Lang
push str.Info
lea ecx, [esp + 0x28]
call eax
test eax, eax
je 0x408c28
lea ecx, [esp + 0x18]
push ecx
push 1
lea ecx, [esp + 0x28]
call fcn.0042ec40
test eax, eax
je 0x408c28
mov ecx, dword [esp + 0x18]
mov eax, dword [ecx - 0xc]
push eax
push ecx
lea ecx, [esp + 0x1c]
call fcn.00409b30
push 2
push 0x4a19ec
lea ecx, [esp + 0x1c]
call fcn.00409b30
mov eax, dword [esp + 0x24]
test eax, eax
je 0x408c51
push eax
call fcn.0045505b
add esp, 4
mov dword [esp + 0x24], 0
mov esi, dword [esp + 0x14]
cmp dword [esi - 4], 1
mov edi, dword [esi - 0xc]
jle 0x408c6e
mov edx, edi
push edx
lea ecx, [esp + 0x18]
call fcn.00404510
mov esi, dword [esp + 0x14]
mov edx, dword [esp + 0x54]
push 0
lea eax, [esp + 0x20]
push eax
lea ecx, [edi + edi]
push ecx
push esi
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ebp, dword [esp + 0x18]
mov edi, dword [esp + 0x58]
lea eax, [esi - 0x10]
mov byte [esp + 0x4c], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x408cae
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
add ebx, 1
cmp dword [edi + 8], ebx
jg 0x408a7b
lea ecx, [esp + 0x20]
mov byte [esp + 0x4c], 0
call fcn.0042f430
lea eax, [ebp - 0x10]
mov dword [esp + 0x4c], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x408cec
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x44]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x3c
ret 8
mov eax, SysReAllocString
sub eax, ecx
jmp 0x4089f1
push 0x80070057
call fcn.004022b0
call fcn.00455154
int3