Function at 0x4b0590
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x6c
push esi
push edi
lea edi, [ebp - 0x6c]
mov ecx, 0x1b
mov eax, 0xcccccccc
rep stosd dword es:[edi], eax
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x18]
and ecx, 0x200
je 0x4b0653
mov edx, dword [ebp + 8]
cmp dword [edx + 0xc], 0
jne 0x4b0653
push 0x14
push 0
push 0x14
mov eax, dword [ebp + 8]
mov ecx, dword [eax]
push ecx
call fcn.00497ff0
push eax
call fcn.00523be0
add esp, 0xc
mov edx, dword [ebp + 8]
mov dword [edx + 0xc], eax
mov esi, esp
push 0
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventA]
cmp esi, esp
call fcn.0052354c
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0xc]
mov dword [edx + 0x10], eax
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0xc]
cmp dword [ecx + 0x10], 0
jne 0x4b0653
mov esi, esp
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp esi, esp
call fcn.0052354c
test eax, eax
jne 0x4b062e
mov dword [ebp - 0x50], 0
jmp 0x4b0645
mov esi, esp
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp esi, esp
call fcn.0052354c
add eax, 0xafc80
mov dword [ebp - 0x50], eax
mov edx, dword [ebp - 0x50]
mov dword [ebp - 4], edx
mov eax, dword [ebp - 4]
jmp 0x4b0ae8
mov eax, dword [ebp + 8]
movzx ecx, byte [eax + 0x2c]
test ecx, ecx
je 0x4b07db
mov edx, dword [ebp + 0xc]
mov dword [ebp - 0x14], edx
mov eax, dword [ebp + 0x10]
mov ecx, dword [eax]
mov dword [ebp - 0x1c], ecx
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x50]
push eax
call fcn.00496fc0
mov ecx, dword [ebp + 8]
cmp dword [ecx + 0x44], 0
jne 0x4b0720
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x40]
xor ecx, ecx
mov edx, dword [ebp + 8]
mov esi, dword [edx + 0x48]
sub esi, eax
mov eax, dword [edx + 0x4c]
sbb eax, ecx
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x3c]
xor ecx, ecx
add esi, edx
adc eax, ecx
mov dword [ebp - 0x24], esi
mov dword [ebp - 0x20], eax
mov edx, dword [ebp - 0x24]
mov dword [ebp - 0x28], edx
mov eax, dword [ebp - 0x24]
mov edx, dword [ebp - 0x20]
mov cl, 0x20
call fcn.005259b0
mov dword [ebp - 0x30], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x54], eax
mov ecx, dword [ebp - 0x54]
mov edx, dword [ebp - 0x24]
cmp edx, dword [ecx + 0x48]
jne 0x4b06e2
mov eax, dword [ebp - 0x54]
mov ecx, dword [ebp - 0x20]
cmp ecx, dword [eax + 0x4c]
je 0x4b0702
mov esi, esp
push 0
lea edx, [ebp - 0x30]
push edx
mov eax, dword [ebp - 0x28]
push eax
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 4]
push edx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp esi, esp
call fcn.0052354c
mov eax, dword [ebp + 8]
mov dword [eax + 0x40], 0
mov ecx, dword [ebp + 8]
mov dword [ecx + 0x3c], 0
mov edx, dword [ebp + 8]
mov dword [edx + 0x44], 1
mov dword [ebp - 4], 0
cmp dword [ebp - 4], 0
jne 0x4b07c2
cmp dword [ebp - 0x1c], 0
jbe 0x4b07c2
mov eax, dword [ebp + 8]
cmp dword [eax + 0x3c], 0x1000
jne 0x4b0753
mov ecx, dword [ebp + 8]
push ecx
call fcn.004b0ed0
mov dword [ebp - 4], eax
mov edx, dword [ebp + 8]
mov eax, 0x1000
sub eax, dword [edx + 0x3c]
cmp dword [ebp - 0x1c], eax
jbe 0x4b0773
mov ecx, dword [ebp + 8]
mov edx, 0x1000
sub edx, dword [ecx + 0x3c]
mov dword [ebp - 0x58], edx
jmp 0x4b0779
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x58], eax
mov ecx, dword [ebp - 0x58]
mov dword [ebp - 0x18], ecx
mov edx, dword [ebp - 0x18]
push edx
mov eax, dword [ebp - 0x14]
push eax
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x38]
mov eax, dword [ebp + 8]
add edx, dword [eax + 0x3c]
push edx
call fcn.00525390
add esp, 0xc
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x3c]
add edx, dword [ebp - 0x18]
mov eax, dword [ebp + 8]
mov dword [eax + 0x3c], edx
mov ecx, dword [ebp - 0x14]
add ecx, dword [ebp - 0x18]
mov dword [ebp - 0x14], ecx
mov edx, dword [ebp - 0x1c]
sub edx, dword [ebp - 0x18]
mov dword [ebp - 0x1c], edx
jmp 0x4b0727
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x50]
push ecx
call fcn.00497160
mov eax, dword [ebp - 4]
jmp 0x4b0ae8
mov edx, dword [ebp + 8]
movzx eax, byte [edx + 8]
test eax, eax
jne 0x4b08e0
mov dword [ebp - 0x40], 0
mov dword [ebp - 0x3c], 0
mov ecx, dword [ebp + 8]
cmp dword [ecx + 0x34], 0
je 0x4b0861
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x50]
push eax
call fcn.00496fc0
push 2
mov ecx, dword [ebp + 8]
push ecx
call fcn.004e05e0
mov dword [ebp - 0x48], eax
cmp dword [ebp - 0x48], 0
je 0x4b0835
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x50]
push eax
call fcn.00497160
mov eax, dword [ebp - 0x48]
jmp 0x4b0ae8
lea ecx, [ebp - 0x40]
push ecx
push 2
mov edx, dword [ebp + 8]
push edx
call fcn.004e08a0
mov dword [ebp - 0x48], eax
cmp dword [ebp - 0x48], 0
je 0x4b0861
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x50]
push ecx
call fcn.00497160
mov eax, dword [ebp - 0x48]
jmp 0x4b0ae8
mov edx, dword [ebp + 8]
cmp dword [edx + 0xc], 0
je 0x4b0892
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x48]
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0xc]
mov dword [eax + 8], ecx
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 0x48]
mov edx, dword [ecx + 0x4c]
mov cl, 0x20
call fcn.005259b0
mov edx, dword [ebp + 8]
mov ecx, dword [edx + 0xc]
mov dword [ecx + 0xc], eax
mov esi, esp
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0xc]
push eax
lea ecx, [ebp - 0xc]
push ecx
mov edx, dword [ebp + 0x10]
mov eax, dword [edx]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp + 8]
mov eax, dword [edx + 4]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp esi, esp
call fcn.0052354c
mov dword [ebp - 4], eax
mov ecx, dword [ebp + 8]
cmp dword [ecx + 0x34], 0
je 0x4b08de
mov edx, dword [ebp + 8]
push edx
call fcn.004e0760
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x50]
push ecx
call fcn.00497160
jmp 0x4b090e
mov esi, esp
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0xc]
push eax
lea ecx, [ebp - 0xc]
push ecx
mov edx, dword [ebp + 0x10]
mov eax, dword [edx]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp + 8]
mov eax, dword [edx + 4]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp esi, esp
call fcn.0052354c
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x4b0928
mov ecx, dword [ebp + 0x10]
mov edx, dword [ebp - 0xc]
mov dword [ecx], edx
mov dword [ebp - 4], 0
jmp 0x4b0ab0
mov eax, dword [ebp + 0x10]
mov dword [eax], 0
mov esi, esp
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp esi, esp
call fcn.0052354c
test eax, eax
jne 0x4b094d
mov dword [ebp - 0x5c], 0
jmp 0x4b0964
mov esi, esp
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp esi, esp
call fcn.0052354c
add eax, 0xafc80
mov dword [ebp - 0x5c], eax
mov ecx, dword [ebp - 0x5c]
mov dword [ebp - 4], ecx
cmp dword [ebp - 4], 0xb0065
jne 0x4b0ab0
mov edx, dword [ebp + 8]
mov dword [ebp - 0x60], edx
mov eax, dword [ebp - 0x60]
mov ecx, dword [ebp - 0x60]
mov edx, dword [eax + 0x10]
or edx, dword [ecx + 0x14]
jne 0x4b0994
mov dword [ebp - 0x4c], 0
jmp 0x4b09d1
mov eax, dword [ebp + 8]
mov dword [ebp - 0x64], eax
mov ecx, dword [ebp - 0x64]
cmp dword [ecx + 0x14], 0
jg 0x4b09b7
jl 0x4b09ae
mov edx, dword [ebp - 0x64]
cmp dword [edx + 0x10], 0
jae 0x4b09b7
mov dword [ebp - 0x4c], 0xffffffff
jmp 0x4b09d1
mov eax, dword [ebp + 8]
push 0
push 0x3e8
mov ecx, dword [eax + 0x14]
push ecx
mov edx, dword [eax + 0x10]
push edx
call fcn.005252e0
mov dword [ebp - 0x4c], eax
mov esi, esp
mov eax, dword [ebp - 0x4c]
push eax
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0xc]
mov eax, dword [edx + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp esi, esp
call fcn.0052354c
mov dword [ebp - 4], eax
mov ecx, dword [ebp - 4]
mov dword [ebp - 0x68], ecx
cmp dword [ebp - 0x68], 0xffffffff
je 0x4b0a59
cmp dword [ebp - 0x68], 0
je 0x4b0a11
cmp dword [ebp - 0x68], 0x102
je 0x4b0a45
jmp 0x4b0a92
mov esi, esp
push 1
lea edx, [ebp - 0xc]
push edx
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0xc]
push ecx
mov edx, dword [ebp + 8]
mov eax, dword [edx + 4]
push eax
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
cmp esi, esp
call fcn.0052354c
mov ecx, dword [ebp + 0x10]
mov edx, dword [ebp - 0xc]
mov dword [ecx], edx
mov dword [ebp - 4], 0
jmp 0x4b0a92
mov eax, dword [ebp - 0x4c]
neg eax
sbb eax, eax
and eax, 0x1116c
add eax, 0xb
mov dword [ebp - 4], eax
jmp 0x4b0a92
mov esi, esp
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp esi, esp
call fcn.0052354c
test eax, eax
jne 0x4b0a75
mov dword [ebp - 0x6c], 0
jmp 0x4b0a8c
mov esi, esp
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp esi, esp
call fcn.0052354c
add eax, 0xafc80
mov dword [ebp - 0x6c], eax
mov ecx, dword [ebp - 0x6c]
mov dword [ebp - 4], ecx
cmp dword [ebp - 4], 0
je 0x4b0ab0
cmp dword [0x5a51dc], 0xe
jl 0x4b0ab0
mov edx, dword [ebp + 8]
mov eax, dword [edx + 4]
push eax
call fcn.004b11a0
add esp, 4
cmp dword [ebp - 4], 0
jne 0x4b0ae5
mov ecx, dword [ebp + 8]
cmp dword [ecx + 0xc], 0
je 0x4b0ae5
mov edx, dword [ebp + 8]
movzx eax, byte [edx + 8]
test eax, eax
jne 0x4b0ae5
mov ecx, dword [ebp + 0x10]
mov edx, dword [ecx]
xor eax, eax
mov ecx, dword [ebp + 8]
add edx, dword [ecx + 0x48]
mov ecx, dword [ecx + 0x4c]
adc ecx, eax
mov eax, dword [ebp + 8]
mov dword [eax + 0x48], edx
mov dword [eax + 0x4c], ecx
mov eax, dword [ebp - 4]
push edx
mov ecx, ebp
push eax
lea edx, [0x4b0b0c]
call fcn.0052356f
pop eax
pop edx
pop edi
pop esi
add esp, 0x6c
cmp ebp, esp
call fcn.0052354c
mov esp, ebp
pop ebp
ret 0xc