Function at 0x487770
Capabilities:
Write file on windows

Disassembly:
push 0xffffffffffffffff
push 0x4ffb48
mov eax, dword fs:[0]
push eax
sub esp, 0x1c
mov eax, dword [0x5364d0]
xor eax, esp
mov dword [esp + 0x18], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x5364d0]
xor eax, esp
push eax
lea eax, [esp + 0x30]
mov dword fs:[0], eax
mov eax, dword [0x565348]
mov eax, dword [eax - 0xc]
mov ebp, dword [esp + 0x40]
mov dword [esp + 0x1c], ebp
test eax, eax
je 0x487ac4
mov edx, dword [0x563288]
mov eax, dword [edx + 0xc]
mov ecx, 0x563288
call eax
add eax, 0x10
mov dword [esp + 0x18], eax
mov dword [esp + 0x38], 0
mov ecx, dword [0x565348]
mov eax, dword [ecx - 0xc]
test eax, eax
jl 0x487934
push 0x515a50
push ecx
call fcn.004e4d6c
add esp, 8
test eax, eax
je 0x487934
sub eax, dword [0x565348]
sar eax, 1
mov esi, eax
cmp esi, 0xffffffff
je 0x487934
push 0x565348
lea ecx, [esp + 0x18]
call fcn.0041ce10
lea ecx, [esp + 0x14]
push ecx
mov ecx, str._lar
mov byte [esp + 0x3c], 1
call fcn.00404370
test eax, eax
je 0x487898
lea edx, [esp + 0x14]
push edx
mov ecx, str._lai
call fcn.00404370
test eax, eax
je 0x487898
lea eax, [esp + 0x14]
push eax
mov ecx, str._lae
call fcn.00404370
test eax, eax
je 0x487898
lea ecx, [esp + 0x14]
push ecx
mov ecx, 0x517290
call fcn.00404370
test eax, eax
je 0x487898
lea edx, [esp + 0x14]
push edx
mov ecx, 0x517298
call fcn.00404370
test eax, eax
je 0x487898
lea eax, [esp + 0x14]
push eax
mov ecx, str._lsd
call fcn.00404370
test eax, eax
jne 0x48790f
add esi, 1
mov eax, dword [0x565348]
mov ecx, dword [eax - 0xc]
js 0x48790f
cmp esi, ecx
jg 0x48790f
lea ecx, [eax + esi*2]
push 0x515a50
push ecx
call fcn.004e4d6c
add esp, 8
test eax, eax
je 0x48790f
sub eax, dword [0x565348]
sar eax, 1
cmp eax, 0xffffffff
je 0x48790f
push esi
sub eax, esi
push 0x565348
lea ecx, [esp + 0x28]
call fcn.0041cd40
lea edi, [esp + 0x18]
mov byte [esp + 0x38], 2
call fcn.00404930
mov byte [esp + 0x38], 1
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x48790f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x38], 0
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x487934
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [esp + 0x18]
push ecx
call fcn.0048b2e0
mov eax, dword [esp + 0x18]
cmp dword [eax - 0xc], 0
je 0x487a9c
xor ebx, ebx
push ebx
push 0x80
push 2
push ebx
push 1
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
jne 0x487a7b
call int.0041a490
test eax, eax
jl 0x487a9c
push 0
lea edx, [esp + 0x28]
push edx
push 2
lea eax, [esp + 0x2c]
push eax
push ebx
mov dword [esp + 0x34], 0xfeff
mov dword [esp + 0x28], 0xa000d
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x4879a9
call int.0041a490
mov esi, dword [ebp + 0xc]
cmp esi, dword [ebp + 0x10]
jbe 0x4879b6
call fcn.004e48f7
mov edi, dword [ebp]
lea esp, [esp]
mov ebp, dword [ebp + 0x10]
mov ecx, dword [esp + 0x1c]
cmp dword [ecx + 0xc], ebp
jbe 0x4879d1
call fcn.004e48f7
mov edx, dword [esp + 0x1c]
mov eax, dword [edx]
test edi, edi
je 0x4879df
cmp edi, eax
je 0x4879e4
call fcn.004e48f7
cmp esi, ebp
je 0x487a91
test edi, edi
jne 0x487a82
call fcn.004e48f7
xor eax, eax
cmp esi, dword [eax + 0x10]
jb 0x487a05
call fcn.004e48f7
mov eax, dword [esi]
mov ebp, dword [eax - 0xc]
test edi, edi
jne 0x487a89
call fcn.004e48f7
xor eax, eax
cmp esi, dword [eax + 0x10]
jb 0x487a1f
call fcn.004e48f7
mov eax, dword [esi]
push 0
lea ecx, [esp + 0x28]
push ecx
lea edx, [ebp + ebp]
mov ebp, dword [sym.imp.KERNEL32.dll_WriteFile]
push edx
push eax
push ebx
call ebp
test eax, eax
jne 0x487a40
call int.0041a490
push 0
lea eax, [esp + 0x2c]
push eax
push 4
lea ecx, [esp + 0x20]
push ecx
push ebx
call ebp
test eax, eax
jne 0x487a5a
call int.0041a490
test edi, edi
jne 0x487a8d
call fcn.004e48f7
xor eax, eax
cmp esi, dword [eax + 0x10]
jb 0x487a6f
call fcn.004e48f7
mov ebp, dword [esp + 0x1c]
add esi, 4
jmp 0x4879c0
mov ebx, eax
jmp 0x48797b
mov eax, dword [edi]
jmp 0x4879fb
mov eax, dword [edi]
jmp 0x487a15
mov eax, dword [edi]
jmp 0x487a65
test ebx, ebx
je 0x487a9c
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esp + 0x38], 0xffffffff
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x487ac4
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x30]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x18]
xor ecx, esp
call fcn.004e3edb
add esp, 0x28
ret