Function at 0x50c834
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffe24
push ebx
lea eax, [ebp - 0xc8]
mov dword [ebp - 0x14], eax
push dword [ebp + 8]
lea edx, [ebp - 0x1cc]
push edx
call fcn.0066ce08
add esp, 8
push 0x2e
lea ecx, [ebp - 0x1cc]
push ecx
call fcn.0066cf51
add esp, 8
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x20]
test eax, eax
jne 0x50c87b
xor eax, eax
jmp 0x50cd91
push str..dmg
push dword [ebp - 0x20]
call fcn.0066cdbc
add esp, 8
test eax, eax
je 0x50c896
xor eax, eax
jmp 0x50cd91
push 0x7e5d76
push dword [ebp - 0x20]
call fcn.0066ce08
add esp, 8
push dword [ebp + 8]
call fcn.0045dbc4
pop ecx
mov dword [ebp - 0x1c], eax
mov edx, dword [ebp - 0x1c]
cmp edx, 0xffffffff
jne 0x50c8c1
xor eax, eax
jmp 0x50cd91
push dword [ebp - 0x14]
push dword [ebp - 0x1c]
call fcn.0050b7d4
add esp, 8
test eax, eax
je 0x50c8e2
push dword [ebp - 0x1c]
call sub.KERNEL32.DLL_CloseHandle
xor eax, eax
jmp 0x50cd91
push 0
push 0
push 2
push 0
push 1
push 0x40000000
lea edx, [ebp - 0x1cc]
push edx
call sub.KERNEL32.DLL_CreateFileA
mov dword [ebp - 0x18], eax
mov ecx, dword [ebp - 0x18]
cmp ecx, 0xffffffff
jne 0x50c920
push dword [ebp - 0x14]
call fcn.0050c764
pop ecx
push dword [ebp - 0x1c]
call sub.KERNEL32.DLL_CloseHandle
xor eax, eax
jmp 0x50cd91
call fcn.00404b70
call fcn.00441290
lea edx, [ebp - 0x1cc]
push edx
call fcn.004413f0
pop ecx
xor ecx, ecx
mov dword [ebp - 8], ecx
xor eax, eax
mov dword [0x6fb15c], eax
mov dword [0x833f58], 0
mov dword [0x833f5c], 0
mov edx, dword [ebp - 0x14]
mov ecx, dword [edx + 8]
mov dword [0x833f50], ecx
mov ecx, dword [edx + 0xc]
mov dword [0x833f54], ecx
xor eax, eax
mov dword [ebp - 0xc], eax
jmp 0x50cd3c
mov edx, dword [ebp - 0x14]
mov ecx, dword [edx + 0x14]
mov eax, dword [ebp - 0xc]
mov edx, dword [ecx + eax*4]
add edx, 0x7ffffffb
sub edx, 3
jb 0x50c9ac
sub edx, 0x7ffffff8
je 0x50cd10
dec edx
je 0x50ccd3
dec edx
je 0x50cd10
jmp 0x50cd39
push 0
mov ecx, dword [ebp - 0x14]
mov eax, dword [ecx + 0x18]
mov edx, dword [ebp - 0xc]
push dword [eax + edx*8 + 4]
push dword [eax + edx*8]
mov eax, dword [ebp - 0x14]
push dword [eax]
call fcn.0045dbe8
add esp, 0x10
mov dword [ebp - 4], eax
mov edx, dword [ebp - 4]
test edx, edx
jne 0x50c9e1
mov dword [ebp - 8], 1
jmp 0x50cd39
xor ecx, ecx
mov dword [ebp - 0x10], ecx
mov eax, dword [ebp - 0x14]
push dword [eax]
mov edx, dword [ebp - 0x14]
mov ecx, dword [edx + 0x1c]
mov eax, dword [ebp - 0xc]
mov eax, dword [ecx + eax*8]
mov edx, dword [ebp - 0x10]
sub eax, edx
push eax
push 1
mov ecx, dword [ebp - 0x14]
mov eax, dword [ecx + 0x2c]
mov edx, dword [ebp - 0x10]
add eax, edx
push eax
call fcn.0045dce4
add esp, 0x10
mov dword [ebp - 4], eax
mov ecx, dword [ebp - 4]
add dword [ebp - 0x10], ecx
mov eax, dword [ebp - 4]
test eax, eax
jle 0x50ca40
mov eax, dword [ebp - 4]
mov edx, dword [ebp - 0x10]
add eax, edx
cdq
mov ecx, dword [ebp - 0x14]
mov ecx, dword [ecx + 0x1c]
mov ebx, dword [ebp - 0xc]
cmp edx, dword [ecx + ebx*8 + 4]
jne 0x50ca3e
cmp eax, dword [ecx + ebx*8]
jb 0x50c9e6
mov eax, dword [ebp - 4]
cdq
mov ecx, dword [ebp - 0x14]
mov ecx, dword [ecx + 0x1c]
mov ebx, dword [ebp - 0xc]
cmp edx, dword [ecx + ebx*8 + 4]
jne 0x50ca56
cmp eax, dword [ecx + ebx*8]
je 0x50ca64
mov dword [ebp - 8], 1
jmp 0x50cd39
mov eax, dword [ebp - 0x14]
mov edx, dword [eax + 0x2c]
mov ecx, dword [ebp - 0x14]
mov dword [ecx + 0x34], edx
mov eax, dword [ebp - 0x14]
mov edx, dword [eax + 0x1c]
mov ecx, dword [ebp - 0xc]
mov eax, dword [edx + ecx*8]
mov edx, dword [ebp - 0x14]
mov dword [edx + 0x38], eax
mov ecx, dword [ebp - 0x14]
mov eax, dword [ecx + 0x30]
mov edx, dword [ebp - 0x14]
mov dword [edx + 0x40], eax
mov ecx, dword [ebp - 0x14]
mov eax, dword [ecx + 0x24]
mov edx, dword [ebp - 0xc]
push dword [eax + edx*8 + 4]
push dword [eax + edx*8]
mov eax, pe_nt_image_headers32
xor edx, edx
call fcn.00674900
mov edx, dword [ebp - 0x14]
mov dword [edx + 0x44], eax
mov ecx, dword [ebp - 0x14]
mov eax, dword [ecx + 0x14]
mov edx, dword [ebp - 0xc]
mov ecx, dword [eax + edx*4]
cmp ecx, reloc.OLEAUT32.DLL_SysFreeString
jne 0x50cb48
mov eax, dword [ebp - 0x14]
add eax, 0x34
push eax
call fcn.0050d0b8
pop ecx
mov dword [ebp - 4], eax
mov edx, dword [ebp - 4]
test edx, edx
je 0x50caeb
mov dword [ebp - 8], 1
jmp 0x50cd39
push 4
mov ecx, dword [ebp - 0x14]
add ecx, 0x34
push ecx
call fcn.0050d2c8
add esp, 8
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
dec eax
jne 0x50cb3c
mov edx, dword [ebp - 0x14]
mov ecx, dword [edx + 0x24]
mov eax, dword [ebp - 0xc]
push dword [ecx + eax*8 + 4]
push dword [ecx + eax*8]
mov eax, pe_nt_image_headers32
xor edx, edx
call fcn.00674900
push edx
push eax
mov ecx, dword [ebp - 0x14]
mov eax, dword [ecx + 0x48]
xor edx, edx
cmp edx, dword [esp + 4]
jne 0x50cb34
cmp eax, dword [esp]
pop edx
pop eax
je 0x50cc24
mov dword [ebp - 8], 1
jmp 0x50cc24
mov ecx, dword [ebp - 0x14]
mov eax, dword [ecx + 0x14]
mov edx, dword [ebp - 0xc]
mov ecx, dword [eax + edx*4]
cmp ecx, reloc.OLEAUT32.DLL_SysStringLen
jne 0x50cbc8
mov eax, dword [ebp - 0x14]
mov edx, dword [eax + 0x44]
mov dword [ebp - 0x28], edx
push 0
push 0
mov ecx, dword [ebp - 0x14]
push dword [ecx + 0x38]
mov eax, dword [ebp - 0x14]
push dword [eax + 0x2c]
lea edx, [ebp - 0x28]
push edx
mov ecx, dword [ebp - 0x14]
push dword [ecx + 0x30]
call fcn.0054f000
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
test eax, eax
jne 0x50cbbe
mov edx, dword [ebp - 0x14]
mov ecx, dword [edx + 0x24]
mov eax, dword [ebp - 0xc]
push dword [ecx + eax*8 + 4]
push dword [ecx + eax*8]
mov eax, pe_nt_image_headers32
xor edx, edx
call fcn.00674900
push edx
push eax
mov eax, dword [ebp - 0x28]
xor edx, edx
cmp edx, dword [esp + 4]
jne 0x50cbba
cmp eax, dword [esp]
pop edx
pop eax
je 0x50cc24
or eax, 0xffffffff
jmp 0x50cd91
push 0
mov edx, dword [ebp - 0x14]
push dword [edx + 0x38]
mov ecx, dword [ebp - 0x14]
push dword [ecx + 0x2c]
mov eax, dword [ebp - 0x14]
push dword [eax + 0x44]
mov edx, dword [ebp - 0x14]
push dword [edx + 0x30]
call fcn.005a9514
add esp, 0x14
mov dword [ebp - 4], eax
mov ecx, dword [ebp - 0x14]
mov eax, dword [ecx + 0x24]
mov edx, dword [ebp - 0xc]
push dword [eax + edx*8 + 4]
push dword [eax + edx*8]
mov eax, pe_nt_image_headers32
xor edx, edx
call fcn.00674900
push edx
push eax
mov eax, dword [ebp - 4]
cdq
cmp edx, dword [esp + 4]
jne 0x50cc18
cmp eax, dword [esp]
pop edx
pop eax
je 0x50cc24
or eax, 0xffffffff
jmp 0x50cd91
mov edx, dword [ebp - 8]
test edx, edx
jne 0x50cc5c
push 0
lea ecx, [ebp - 0x24]
push ecx
mov eax, dword [ebp - 0x14]
mov edx, dword [eax + 0x24]
mov ecx, dword [ebp - 0xc]
push dword [edx + ecx*8 + 4]
push dword [edx + ecx*8]
mov eax, pe_nt_image_headers32
xor edx, edx
call fcn.00674900
push eax
mov edx, dword [ebp - 0x14]
push dword [edx + 0x30]
push dword [ebp - 0x18]
call sub.KERNEL32.DLL_WriteFile
mov eax, dword [ebp - 0x24]
xor edx, edx
add dword [0x833f58], eax
adc dword [0x833f5c], edx
mov eax, dword [0x833f58]
mov edx, dword [0x833f5c]
mov dword [ebp - 0x1d4], eax
sub edx, 0x80000000
mov dword [ebp - 0x1d0], edx
fild qword [ebp - 0x1d4]
fadd qword [0x50cd98]
mov eax, dword [0x833f50]
mov edx, dword [0x833f54]
mov dword [ebp - 0x1dc], eax
sub edx, 0x80000000
mov dword [ebp - 0x1d8], edx
fild qword [ebp - 0x1dc]
fadd qword [0x50cd98]
fdivp st(1)
add esp, 0xfffffff8
fstp qword [esp]
call fcn.00441458
add esp, 8
jmp 0x50cd39
push dword [ebp - 0x18]
mov ecx, dword [ebp - 0x14]
mov eax, dword [ecx + 0x1c]
mov edx, dword [ebp - 0xc]
push dword [eax + edx*8 + 4]
push dword [eax + edx*8]
mov eax, dword [ebp - 0x14]
mov edx, dword [eax + 0x18]
mov ecx, dword [ebp - 0xc]
push dword [edx + ecx*8 + 4]
push dword [edx + ecx*8]
mov edx, dword [ebp - 0x14]
push dword [edx]
call fcn.0050b2e5
add esp, 0x18
test eax, eax
jne 0x50cd39
mov dword [ebp - 8], 1
jmp 0x50cd39
push dword [ebp - 0x18]
mov ecx, dword [ebp - 0x14]
mov eax, dword [ecx + 0x24]
mov edx, dword [ebp - 0xc]
push dword [eax + edx*8 + 4]
push dword [eax + edx*8]
mov eax, pe_nt_image_headers32
xor edx, edx
call fcn.00674900
push edx
push eax
call fcn.0050b40d
add esp, 0xc
inc dword [ebp - 0xc]
mov eax, dword [ebp - 8]
test eax, eax
jne 0x50cd5e
mov edx, dword [0x6fb15c]
test edx, edx
jne 0x50cd5e
mov ecx, dword [ebp - 0xc]
mov eax, dword [ebp - 0x14]
mov edx, dword [eax + 4]
cmp ecx, edx
jb 0x50c976
push dword [ebp - 0x18]
call sub.KERNEL32.DLL_CloseHandle
push dword [ebp - 0x14]
call fcn.0050c764
pop ecx
push dword [ebp - 0x1c]
call sub.KERNEL32.DLL_CloseHandle
call fcn.00441378
call fcn.00404b84
mov ecx, dword [ebp - 8]
test ecx, ecx
je 0x50cd8c
xor eax, eax
jmp 0x50cd91
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret