Function at 0x485110
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x14
xor ecx, ecx
push ebx
push ebp
mov ebp, dword [esp + 0x28]
push esi
mov esi, dword [esp + 0x34]
push edi
mov edi, dword [esp + 0x2c]
cmp dword [esi + 0xc054], ecx
jne 0x485185
cmp dword [esi + 0x4ea0], ecx
je 0x485185
mov ebx, dword [esp + 0x28]
mov eax, edi
or eax, ebp
mov dword [esp + 0x14], edi
mov dword [esp + 0x18], ebp
je 0x485185
push esi
call fcn.00484d50
movsx ecx, byte [ebx]
push esi
push ecx
mov dword [esp + 0x38], eax
call fcn.00484d70
mov dl, byte [esp + 0x38]
mov al, byte [ebx]
mov ecx, dword [esp + 0x24]
xor al, dl
mov byte [ebx], al
mov eax, dword [esp + 0x20]
add esp, 0xc
inc ebx
add eax, 0xffffffff
adc ecx, 0xffffffff
mov dword [esp + 0x14], eax
or eax, ecx
mov dword [esp + 0x18], ecx
jne 0x485147
xor ecx, ecx
mov eax, dword [esi + 0x8f4]
mov ebx, 3
cmp eax, ecx
je 0x48523a
cmp ebp, ecx
jl 0x48523a
jg 0x4851aa
cmp edi, ecx
jbe 0x48523a
mov ecx, dword [esi + 0x90c]
mov edx, dword [esi + 0x904]
lea eax, [esp + 0x10]
mov dword [esp + 0x38], edi
push eax
mov eax, dword [esi + 0x900]
push ecx
mov ecx, 0x20
mov dword [esp + 0x18], ebx
call fcn.004b56a0
mov edx, dword [esi + 0x900]
push eax
mov eax, dword [esi + 0x8f8]
push edx
mov edx, dword [esi + 0x8fc]
mov ecx, 0x20
call fcn.004b56a0
mov edx, dword [esp + 0x38]
push eax
mov eax, dword [esi + 0x8f8]
lea ecx, [esp + 0x4c]
push eax
push ecx
push edx
push 2
call dword [esi + 0x908]
mov eax, dword [esp + 0x10]
test eax, eax
jl 0x48522f
cmp eax, 2
jg 0x48522f
mov dword [esi + 0xa0], 1
pop edi
pop esi
xor eax, eax
pop ebp
xor edx, edx
pop ebx
add esp, 0x14
ret
push esi
call fcn.00476250
add esp, 4
xor ecx, ecx
cmp dword [esi + 0x8ec], ecx
je 0x48530a
mov ecx, dword [esi + 0x90c]
mov edx, dword [esi + 0x904]
lea eax, [esp + 0x10]
mov dword [esp + 0x38], edi
push eax
mov eax, dword [esi + 0x900]
push ecx
mov ecx, 0x20
mov dword [esp + 0x18], ebx
call fcn.004b56a0
mov edx, dword [esi + 0x900]
push eax
mov eax, dword [esi + 0x8f8]
push edx
mov edx, dword [esi + 0x8fc]
mov ecx, 0x20
call fcn.004b56a0
mov edx, dword [esp + 0x38]
push eax
mov eax, dword [esi + 0x8f8]
lea ecx, [esp + 0x4c]
push eax
push ecx
push edx
push 1
call dword [esi + 0x908]
mov eax, dword [esp + 0x10]
cmp eax, ebx
ja case.0x4852b4.0
jmp dword [eax*4 + 0x4856ac]
mov eax, dword [esp + 0x38]
cmp eax, edi
jne 0x48567f
mov ecx, dword [esi + 0x900]
push esi
add ecx, eax
mov dword [esi + 0x900], ecx
mov eax, dword [esi + 0x904]
adc eax, 0
mov dword [esi + 0x904], eax
call fcn.00476250
mov eax, dword [esp + 0x3c]
add esp, 4
xor edx, edx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret
mov dword [esi + 0xa0], 1
jmp case.0x4852b4.0
mov eax, dword [esp + 0x34]
cmp eax, ecx
je 0x485696
mov eax, dword [eax]
cmp eax, 0xffffffff
je 0x485696
test byte [esi + 0x5735], 0x80
je 0x48565a
mov eax, dword [esi + 0xa8]
mov dword [esp + 0x14], ecx
cmp eax, 0xffffffff
mov dword [esp + 0x18], ecx
jne 0x48550e
mov ecx, dword [esi + 0x4ea8]
mov eax, dword [esp + 0x28]
push esi
push ecx
mov dword [esp + 0x34], eax
mov ebx, ebp
call fcn.00482af0
add esp, 8
cmp edx, ebp
jl 0x4853be
jg 0x485369
cmp eax, edi
jb 0x4853be
mov ecx, dword [esp + 0x34]
mov eax, dword [esp + 0x28]
lea edx, [esp + 0x38]
push 0
push edx
mov edx, dword [ecx]
push edi
push eax
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4854f5
cmp dword [esp + 0x38], edi
jne 0x4854f5
mov ecx, dword [esi + 0x5758]
mov dword [esp + 0x14], edi
add ecx, edi
mov dword [esp + 0x18], ebp
mov dword [esi + 0x5758], ecx
mov eax, dword [esi + 0x575c]
adc eax, ebp
mov dword [esi + 0x575c], eax
jmp 0x4854f5
test ebp, ebp
jl 0x485489
jg 0x4853d4
cmp edi, 0x200
jb 0x485489
mov ebp, dword [esp + 0x34]
push esi
push 0
push 0x200
push ebp
push 0
call fcn.00483e80
add esp, 0x14
test eax, eax
jne 0x485464
mov ecx, dword [esp + 0x2c]
mov edx, dword [ebp]
push eax
lea eax, [esp + 0x3c]
push eax
push 0x200
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x485464
mov ecx, dword [esp + 0x38]
mov eax, 0x200
cmp ecx, eax
jne 0x485464
mov ecx, dword [esi + 0x5758]
add ecx, eax
mov dword [esi + 0x5758], ecx
mov edx, dword [esi + 0x575c]
mov ecx, 0
adc edx, ecx
add edi, 0xfffffe00
mov dword [esi + 0x575c], edx
mov edx, dword [esp + 0x14]
adc ebx, 0xffffffff
add edx, eax
mov dword [esp + 0x14], edx
mov edx, dword [esp + 0x18]
adc edx, ecx
mov ecx, dword [esp + 0x2c]
add ecx, eax
mov dword [esp + 0x18], edx
mov dword [esp + 0x2c], ecx
jmp 0x485468
xor edi, edi
xor ebx, ebx
push esi
call fcn.00476250
add esp, 4
test ebx, ebx
jg 0x4853d4
jl 0x48548d
cmp edi, 0x200
jae 0x4853d4
jmp 0x48548d
mov ebp, dword [esp + 0x34]
mov eax, edi
or eax, ebx
je 0x4854f5
push esi
push ebx
push edi
push ebp
push 0
call fcn.00483e80
add esp, 0x14
test eax, eax
jne 0x4854f5
mov edx, dword [esp + 0x2c]
lea ecx, [esp + 0x38]
push eax
mov eax, dword [ebp]
push ecx
push edi
push edx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4854f5
cmp dword [esp + 0x38], edi
jne 0x4854f5
mov ebp, dword [esi + 0x5758]
mov ecx, dword [esp + 0x14]
mov eax, dword [esp + 0x18]
add ebp, edi
mov dword [esi + 0x5758], ebp
mov edx, dword [esi + 0x575c]
adc edx, ebx
add ecx, edi
adc eax, ebx
mov dword [esi + 0x575c], edx
mov dword [esp + 0x14], ecx
mov dword [esp + 0x18], eax
push esi
call fcn.00476250
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret
mov ecx, dword [esp + 0x28]
mov ebx, edi
test ebp, ebp
mov dword [esp + 0x2c], ecx
jl 0x48564a
jg 0x48552a
test edi, edi
jbe 0x48564a
push esi
call fcn.00484710
add esp, 4
cmp edx, ebp
mov edi, eax
mov dword [esp + 0x20], edx
jl 0x4855a4
jg 0x485543
cmp edi, ebx
jb 0x4855a4
mov eax, dword [esp + 0x2c]
mov ecx, dword [esi + 0xa8]
lea edx, [esp + 0x38]
push 0
push edx
push ebx
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x48562f
cmp dword [esp + 0x38], ebx
jne 0x48562f
mov edi, dword [esp + 0x14]
mov edx, dword [esp + 0x18]
mov ecx, dword [esi + 0x5758]
add edi, ebx
adc edx, ebp
add ecx, ebx
mov dword [esi + 0x5758], ecx
mov eax, dword [esi + 0x575c]
adc eax, ebp
mov dword [esp + 0x14], edi
mov dword [esp + 0x18], edx
mov dword [esi + 0x575c], eax
jmp 0x48562b
mov eax, dword [esp + 0x2c]
mov ecx, dword [esi + 0xa8]
lea edx, [esp + 0x38]
push 0
push edx
push edi
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x485613
mov eax, dword [esp + 0x38]
cdq
cmp eax, edi
jne 0x485613
mov eax, dword [esp + 0x20]
cmp edx, eax
jne 0x485613
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x18]
sub ebx, edi
sbb ebp, eax
add ecx, edi
adc edx, eax
mov dword [esp + 0x14], ecx
mov ecx, dword [esp + 0x2c]
mov dword [esp + 0x18], edx
mov edx, dword [esi + 0x5758]
add ecx, edi
add edx, edi
mov dword [esp + 0x2c], ecx
mov dword [esi + 0x5758], edx
mov ecx, dword [esi + 0x575c]
adc ecx, eax
mov dword [esi + 0x575c], ecx
jmp 0x485617
xor ebx, ebx
xor ebp, ebp
mov edx, dword [esp + 0x34]
push esi
push edx
push 0
call fcn.00484830
add esp, 0xc
test eax, eax
je 0x48562f
xor ebx, ebx
xor ebp, ebp
push esi
call fcn.00476250
add esp, 4
test ebp, ebp
jg 0x48552a
jl 0x48564a
test ebx, ebx
ja 0x48552a
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0x18]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret
mov edx, dword [esp + 0x28]
push ecx
lea ecx, [esp + 0x3c]
push ecx
push edi
push edx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je case.0x4852b4.0
cmp dword [esp + 0x38], edi
je 0x48567f
mov dword [esp + 0x38], 0
push esi
call fcn.00476250
mov eax, dword [esp + 0x3c]
add esp, 4
xor edx, edx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret
push esi
call fcn.00476250
add esp, 4
xor eax, eax
xor edx, edx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret