Function at 0x49d980
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x650
mov eax, dword [0x590cc0]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [ebp + 0x10]
test eax, eax
jne 0x49d9b7
mov eax, 0x10000
mov dword [0x595148], eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004b9ff3
mov esp, ebp
pop ebp
ret
cmp dword [eax], 1
je 0x49d9d5
mov eax, 0x80000
mov dword [0x595148], eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004b9ff3
mov esp, ebp
pop ebp
ret
push esi
push edi
mov edi, dword [eax + 4]
or esi, 0xffffffff
cmp dword [edi + 4], esi
je 0x49d9ed
mov eax, dword [edi]
push eax
call fcn.0049b490
add esp, 4
mov eax, dword [edi]
mov dword [edi + 4], esi
mov esi, dword [ebp + 0xc]
cmp esi, dword [eax + 4]
jl 0x49da04
mov eax, 0x10000
jmp 0x49dcec
cmp esi, dword [eax + 0x10]
jge 0x49da12
push eax
call fcn.0049b1f0
add esp, 4
mov ecx, dword [edi]
cmp dword [ecx + 0x10], esi
jge 0x49da79
lea esp, [esp]
mov esi, dword [edi]
test esi, esi
je 0x49da6d
cmp dword [esi + 0x18], 0
je 0x49da6d
mov eax, dword [esi + 0x10]
inc eax
cmp eax, dword [esi + 4]
je 0x49da6d
mov edx, dword [esi + 0x50]
add edx, dword [esi + 0x4c]
mov ecx, dword [esi + 0x48]
push 0
push 0
push 0
push 0
push 0
mov dword [esi + 0x10], eax
push 0
lea edx, [edx + ecx + 0x2e]
add dword [esi + 0x14], edx
lea eax, [esi + 0x78]
push eax
lea ecx, [esi + 0x28]
push ecx
push esi
call fcn.0049ae50
add esp, 0x24
neg eax
sbb eax, eax
inc eax
mov dword [esi + 0x18], eax
mov edx, dword [edi]
mov eax, dword [ebp + 0xc]
cmp dword [edx + 0x10], eax
jl 0x49da20
mov esi, eax
lea ecx, [ebp - 0x644]
push ecx
push esi
mov ecx, edi
call fcn.0049b630
test byte [ebp - 0x438], 0x10
movzx eax, word [ebx]
je 0x49dad3
cmp eax, 0x2f
je 0x49daaa
cmp eax, 0x5c
je 0x49daaa
test ax, ax
je 0x49dabc
cmp word [ebx + 2], 0x3a
jne 0x49dabc
push ebx
push 0
call fcn.0049bc30
add esp, 8
xor eax, eax
jmp 0x49dcec
push ebx
add edi, 0x244
push edi
call fcn.0049bc30
add esp, 8
xor eax, eax
jmp 0x49dcec
mov esi, ebx
mov dword [ebp - 0x648], esi
mov ecx, ebx
test ax, ax
je 0x49db05
cmp ax, 0x2f
je 0x49daee
cmp ax, 0x5c
jne 0x49daf9
lea edx, [ecx + 2]
mov dword [ebp - 0x648], edx
mov esi, edx
movzx eax, word [ecx + 2]
add ecx, 2
test ax, ax
jne 0x49dae2
lea edx, [ebp - 0x20c]
mov eax, ebx
sub edx, ebx
nop
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x49db10
cmp esi, ebx
jne 0x49db95
xor eax, eax
mov word [ebp - 0x20c], ax
mov eax, dword [ebp - 0x648]
push eax
lea ecx, [ebp - 0x20c]
push ecx
lea esi, [edi + 0x244]
push esi
lea edx, [ebp - 0x414]
push 0x55d600
push edx
call dword [sym.imp.USER32.dll_wsprintfW]
lea eax, [ebp - 0x20c]
push eax
push esi
call fcn.0049bc30
add esp, 0x1c
mov ecx, dword [ebp - 0x438]
push 0
push ecx
push 2
push 0
push 0
push 0x40000000
lea edx, [ebp - 0x414]
push edx
call dword [sym.imp.KERNEL32.DLL_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x49dbff
mov eax, 0x200
jmp 0x49dcec
mov ecx, esi
sub ecx, ebx
sar ecx, 1
xor edx, edx
mov word [ebp + ecx*2 - 0x20c], dx
mov ax, word [ebp - 0x20c]
cmp ax, 0x2f
je 0x49dbcf
cmp ax, 0x5c
je 0x49dbcf
test ax, ax
je 0x49db2c
cmp word [ebp - 0x20a], 0x3a
jne 0x49db2c
push esi
lea eax, [ebp - 0x20c]
push eax
lea ecx, [ebp - 0x414]
push 0x55d5f4
push ecx
call dword [sym.imp.USER32.dll_wsprintfW]
lea edx, [ebp - 0x20c]
push edx
push 0
call fcn.0049bc30
add esp, 0x18
jmp 0x49db63
mov eax, dword [edi + 0x23c]
mov ecx, dword [edi]
push eax
push ecx
call fcn.0049d3a0
add esp, 8
cmp dword [edi + 0x240], 0
jne 0x49dc2d
push 0x4000
call fcn.004b7ad5
add esp, 4
mov dword [edi + 0x240], eax
mov dword [ebp - 0x648], 0
jmp 0x49dc40
mov eax, dword [edi + 0x240]
mov ecx, dword [edi]
lea edx, [ebp - 0x649]
push edx
push 0x4000
push eax
push ecx
call fcn.0049d520
mov esi, eax
add esp, 0x10
cmp esi, 0xffffff96
je 0x49dca0
test esi, esi
js 0x49dc94
jle 0x49dc87
mov eax, dword [edi + 0x240]
push 0
lea edx, [ebp - 0x650]
push edx
push esi
push eax
push ebx
call dword [sym.imp.KERNEL32.DLL_WriteFile]
test eax, eax
je 0x49dcac
cmp byte [ebp - 0x649], 0
jne 0x49dcb8
test esi, esi
jne 0x49dc40
mov dword [ebp - 0x648], 0x5000000
jmp 0x49dcd4
mov dword [ebp - 0x648], 0x1000
jmp 0x49dcd4
mov dword [ebp - 0x648], 0x400
jmp 0x49dcd4
lea ecx, [ebp - 0x424]
push ecx
lea edx, [ebp - 0x434]
push edx
lea eax, [ebp - 0x42c]
push eax
push ebx
call dword [sym.imp.KERNEL32.DLL_SetFileTime]
push ebx
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
mov ecx, dword [edi]
push ecx
call fcn.0049b490
mov eax, dword [ebp - 0x648]
add esp, 4
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
mov dword [0x595148], eax
pop ebx
call fcn.004b9ff3
mov esp, ebp
pop ebp
ret