Function at 0x404520
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x148
mov eax, dword [0x5e1da0]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push 0
push 0
mov ebx, ecx
mov eax, dword [ebx + 0x8c]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov ecx, dword [ebx + 0x70]
add ecx, dword [ebx + 0x6c]
mov edx, dword [ebx + 0x84]
add ecx, ecx
lea eax, [edx + ecx*8 + 0x2892]
push 0xffff
mov dword [ebp - 0x13c], eax
mov dword [ebp - 0x12c], 0x2272
mov dword [ebp - 0x130], 0x1094
mov dword [ebp - 0x140], 0x107e
mov dword [ebp - 0x138], 0x28
mov dword [ebp - 0x148], 0x12
mov dword [ebp - 0x134], 0x104
mov dword [ebp - 0x144], 0xf8
call fcn.004575d3
push 0xffff
mov edi, eax
push 0
push edi
mov dword [ebp - 0x124], edi
call fcn.00552060
mov ecx, 0x14
mov esi, 0x58a7a8
rep movsd dword es:[edi], dword [esi]
push 0xf8
movsb byte es:[edi], byte [esi]
call fcn.004575d3
push 0xf8
mov esi, eax
xor edi, edi
push edi
push esi
mov dword [ebp - 0x128], esi
call fcn.00552060
add esp, 0x20
push edi
lea ecx, [ebp - 0x104]
push ecx
push 4
mov byte [esi], 1
mov edx, dword [ebx + 0x8c]
mov esi, dword [sym.imp.KERNEL32.dll_WriteFile]
push 0x5d9e20
push edx
call esi
mov edx, dword [ebx + 0x8c]
push edi
lea eax, [ebp - 0x104]
push eax
push 4
lea ecx, [ebp - 0x13c]
push ecx
push edx
call esi
mov ecx, dword [ebx + 0x8c]
push edi
lea eax, [ebp - 0x104]
push eax
push 4
push 0x5d9e24
push ecx
call esi
mov eax, dword [ebx + 0x8c]
push edi
lea edx, [ebp - 0x104]
push edx
push 4
push 0x5d9e48
push eax
call esi
push edi
mov eax, dword [ebx + 0x8c]
lea ecx, [ebp - 0x104]
push ecx
push 4
lea edx, [ebp - 0x12c]
push edx
push eax
call esi
mov edx, dword [ebx + 0x8c]
push edi
lea ecx, [ebp - 0x104]
push ecx
push 4
push 0x5d9e28
push edx
call esi
fild dword [ebx + 0x80]
mov eax, dword [ebx + 0x80]
mov dword [ebp - 0x100], 0x68697661
mov dword [ebp - 0xfc], 0x38
test eax, eax
jns 0x4046c2
fadd qword [0x58a810]
fld qword [0x58a808]
mov edx, dword [ebx + 0x6c]
fld st(0)
push edi
fdivrp st(2)
mov dword [ebp - 0xe8], edx
lea edx, [ebp - 0x104]
push edx
push 0x40
mov dword [ebp - 0xf4], 0xf424
mov dword [ebp - 0xf0], edi
mov dword [ebp - 0xec], 0x20110
mov dword [ebp - 0xe4], edi
mov dword [ebp - 0xe0], 2
mov dword [ebp - 0xdc], 0x40000
mov dword [ebp - 0xd0], edi
mov dword [ebp - 0xcc], edi
mov dword [ebp - 0xc8], edi
mov dword [ebp - 0xc4], edi
fnstcw word [ebp - 0x106]
fmulp st(1)
movzx eax, word [ebp - 0x106]
or eax, 0xc00
mov dword [ebp - 0x118], eax
movzx eax, word [ebx + 0x74]
fldcw word [ebp - 0x118]
mov dword [ebp - 0xd8], eax
lea eax, [ebp - 0x100]
push eax
fistp qword [ebp - 0x11c]
mov ecx, dword [ebp - 0x11c]
mov dword [ebp - 0xf8], ecx
movzx ecx, word [ebx + 0x76]
fldcw word [ebp - 0x106]
mov dword [ebp - 0xd4], ecx
mov ecx, dword [ebx + 0x8c]
push ecx
call esi
mov eax, dword [ebx + 0x8c]
push edi
lea edx, [ebp - 0x104]
push edx
push 4
push 0x5d9e48
push eax
call esi
mov eax, dword [ebx + 0x8c]
push edi
lea ecx, [ebp - 0x104]
push ecx
push 4
lea edx, [ebp - 0x130]
push edx
push eax
call esi
mov edx, dword [ebx + 0x8c]
push edi
lea ecx, [ebp - 0x104]
push ecx
push 4
push 0x5d9e2c
push edx
call esi
fild dword [ebx + 0x80]
mov eax, dword [0x5d9e34]
mov dword [ebp - 0x8c], eax
mov eax, dword [ebx + 0x80]
xor ecx, ecx
mov dword [ebp - 0x98], 0x68727473
mov dword [ebp - 0x94], 0x38
mov dword [ebp - 0x90], 0x73646976
mov dword [ebp - 0x88], edi
mov dword [ebp - 0x84], ecx
mov dword [ebp - 0x80], edi
mov dword [ebp - 0x7c], 0x64
test eax, eax
jns 0x404828
fadd qword [0x58a810]
fmul qword [0x58a800]
mov edx, dword [ebx + 0x6c]
fnstcw word [ebp - 0x106]
mov dword [ebp - 0x70], edx
movzx eax, word [ebp - 0x106]
movzx edx, word [ebx + 0x74]
or eax, 0xc00
mov dword [ebp - 0x118], eax
push edi
mov dword [ebp - 0x74], edi
fldcw word [ebp - 0x118]
mov dword [ebp - 0x6c], 0x40000
mov dword [ebp - 0x68], 0xffffffff
fistp qword [ebp - 0x11c]
mov ecx, dword [ebp - 0x11c]
mov dword [ebp - 0x78], ecx
movzx ecx, word [ebx + 0x76]
fldcw word [ebp - 0x106]
mov eax, ecx
mov word [ebp - 0x5a], cx
lea ecx, [ebp - 0x104]
push ecx
push 0x40
imul eax, edx
lea eax, [eax + eax*2]
mov dword [ebp - 0x64], eax
movzx eax, word [ebx + 0x74]
xor edx, edx
mov dword [ebp - 0x60], edx
lea edx, [ebp - 0x98]
mov word [ebp - 0x5c], ax
mov eax, dword [ebx + 0x8c]
push edx
push eax
call esi
mov edx, dword [ebx + 0x8c]
push edi
lea ecx, [ebp - 0x104]
push ecx
push 4
push 0x5d9e30
push edx
call esi
mov edx, dword [ebx + 0x8c]
push edi
lea eax, [ebp - 0x104]
push eax
push 4
lea ecx, [ebp - 0x138]
push ecx
push edx
call esi
movzx ecx, word [ebx + 0x74]
movzx eax, word [ebx + 0x76]
mov dword [ebp - 0xb8], eax
imul eax, ecx
mov edx, 1
mov word [ebp - 0xb4], dx
push edi
mov edx, 0x18
mov dword [ebp - 0xbc], ecx
mov word [ebp - 0xb2], dx
mov edx, dword [0x5d9e38]
lea ecx, [ebp - 0x104]
push ecx
lea eax, [eax + eax*2]
mov dword [ebp - 0xb0], edx
push 0x28
lea edx, [ebp - 0xc0]
mov dword [ebp - 0xac], eax
mov eax, dword [ebx + 0x8c]
push edx
push eax
mov dword [ebp - 0xc0], 0x28
mov dword [ebp - 0xa8], edi
mov dword [ebp - 0xa4], edi
mov dword [ebp - 0xa0], edi
mov dword [ebp - 0x9c], edi
call esi
push edi
lea ecx, [ebp - 0x104]
mov edx, dword [ebx + 0x8c]
push ecx
push 4
push 0x5d9e4c
push edx
call esi
mov edx, dword [ebx + 0x8c]
push edi
lea eax, [ebp - 0x104]
push eax
push 4
lea ecx, [ebp - 0x10c]
push ecx
push edx
mov dword [ebp - 0x10c], 0x1018
call esi
mov ecx, dword [ebp - 0x10c]
mov edx, dword [ebp - 0x124]
push edi
lea eax, [ebp - 0x104]
push eax
mov eax, dword [ebx + 0x8c]
push ecx
push edx
push eax
call esi
mov edx, dword [ebx + 0x8c]
push edi
lea ecx, [ebp - 0x104]
push ecx
push 4
push 0x5d9e48
push edx
call esi
mov edx, dword [ebx + 0x8c]
push edi
lea eax, [ebp - 0x104]
push eax
push 4
lea ecx, [ebp - 0x140]
push ecx
push edx
call esi
mov ecx, dword [ebx + 0x8c]
push edi
lea eax, [ebp - 0x104]
push eax
push 4
push 0x5d9e2c
push ecx
call esi
mov ecx, dword [ebx + 0x114]
mov dword [ebp - 0x120], edi
cmp ecx, edi
je 0x404b16
lea edx, [ebx + 0x98]
mov dword [ebp - 0x108], 0xff
mov dword [ebp - 0x114], 2
mov dword [ebp - 0x110], edx
mov dword [ebp - 0x118], 8
jmp 0x404a50
mov eax, dword [ebp - 0x110]
mov eax, dword [eax - 4]
sub eax, ecx
cdq
xor eax, edx
sub eax, edx
cmp dword [ebp - 0x108], eax
jle 0x404a7d
mov edx, dword [ebp - 0x114]
add edx, 0xfffffffe
mov dword [ebp - 0x108], eax
mov dword [ebp - 0x120], edx
mov eax, dword [ebp - 0x110]
mov eax, dword [eax]
sub eax, ecx
cdq
xor eax, edx
sub eax, edx
cmp dword [ebp - 0x108], eax
jle 0x404aa7
mov edx, dword [ebp - 0x114]
dec edx
mov dword [ebp - 0x108], eax
mov dword [ebp - 0x120], edx
mov eax, dword [ebp - 0x110]
mov eax, dword [eax + 4]
sub eax, ecx
cdq
xor eax, edx
sub eax, edx
cmp dword [ebp - 0x108], eax
jle 0x404ad1
mov edx, dword [ebp - 0x114]
mov dword [ebp - 0x108], eax
mov dword [ebp - 0x120], edx
mov eax, dword [ebp - 0x110]
mov eax, dword [eax + 8]
sub eax, ecx
cdq
xor eax, edx
sub eax, edx
cmp dword [ebp - 0x108], eax
jle 0x404afc
mov edx, dword [ebp - 0x114]
inc edx
mov dword [ebp - 0x108], eax
mov dword [ebp - 0x120], edx
add dword [ebp - 0x110], 0x10
add dword [ebp - 0x114], 4
dec dword [ebp - 0x118]
jne 0x404a50
movzx ecx, word [ebx + 0x118]
mov edx, dword [ebp - 0x120]
xor eax, eax
mov dword [ebp - 0x40], edx
mov edx, dword [ebx + 0x70]
add ecx, ecx
mov dword [ebp - 0x44], eax
push edi
mov eax, 2
mov dword [ebp - 0x38], ecx
mov dword [ebp - 0x30], edx
xor edx, edx
lea ecx, [ebp - 0x104]
push ecx
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x24], eax
xor eax, eax
mov dword [ebp - 0x1c], edx
push 0x40
lea edx, [ebp - 0x58]
mov dword [ebp - 0x20], eax
mov eax, dword [ebx + 0x8c]
push edx
push eax
mov dword [ebp - 0x58], 0x68727473
mov dword [ebp - 0x54], 0x38
mov dword [ebp - 0x50], 0x73647561
mov dword [ebp - 0x4c], edi
mov dword [ebp - 0x48], edi
mov dword [ebp - 0x34], edi
mov dword [ebp - 0x2c], 0x40000
mov dword [ebp - 0x28], 0xffffffff
call esi
mov edx, dword [ebx + 0x8c]
push edi
lea ecx, [ebp - 0x104]
push ecx
push 4
push 0x5d9e30
push edx
call esi
mov edx, dword [ebx + 0x8c]
push edi
lea eax, [ebp - 0x104]
push eax
push 4
lea ecx, [ebp - 0x148]
push ecx
push edx
call esi
mov eax, 0x12
mov word [ebp - 8], di
mov word [ebp - 8], ax
movzx eax, word [ebx + 0x118]
push edi
lea ecx, [ebp - 0x104]
push ecx
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x14], eax
add eax, eax
push 0x12
mov dword [ebp - 0x10], edi
lea edx, [ebp - 0x18]
mov dword [ebp - 0x10], eax
mov eax, dword [ebx + 0x8c]
push edx
mov dword [ebp - 0x18], edi
mov dword [ebp - 0xc], edi
push eax
mov dword [ebp - 0x18], 0x10001
mov dword [ebp - 0xc], 0x100002
call esi
mov edx, dword [ebx + 0x8c]
push edi
lea ecx, [ebp - 0x104]
push ecx
push 4
push 0x5d9e4c
push edx
call esi
mov dword [ebp - 0x10c], 0x1018
mov edx, dword [ebx + 0x8c]
push edi
lea eax, [ebp - 0x104]
push eax
push 4
lea ecx, [ebp - 0x10c]
push ecx
push edx
call esi
mov ecx, dword [ebp - 0x10c]
mov edx, dword [ebp - 0x124]
push edi
lea eax, [ebp - 0x104]
push eax
mov eax, dword [ebx + 0x8c]
push ecx
push edx
push eax
call esi
mov edx, dword [ebx + 0x8c]
push edi
lea ecx, [ebp - 0x104]
push ecx
push 4
push 0x5d9e48
push edx
call esi
mov edx, dword [ebx + 0x8c]
push edi
lea eax, [ebp - 0x104]
push eax
push 4
lea ecx, [ebp - 0x134]
push ecx
push edx
call esi
mov ecx, dword [ebx + 0x8c]
push edi
lea eax, [ebp - 0x104]
push eax
push 4
push 0x5d9e50
push ecx
call esi
mov eax, dword [ebx + 0x8c]
push edi
lea edx, [ebp - 0x104]
push edx
push 4
push 0x5d9e54
push eax
call esi
mov eax, dword [ebx + 0x8c]
push edi
lea ecx, [ebp - 0x104]
push ecx
push 4
lea edx, [ebp - 0x144]
push edx
push eax
call esi
mov edx, dword [ebp - 0x128]
mov eax, dword [ebx + 0x8c]
push edi
lea ecx, [ebp - 0x104]
push ecx
push 0xf8
push edx
push eax
call esi
mov edx, dword [ebx + 0x8c]
push edi
lea ecx, [ebp - 0x104]
push ecx
push 4
push 0x5d9e4c
push edx
call esi
mov dword [ebp - 0x10c], 0x5f8
push edi
lea eax, [ebp - 0x104]
mov edx, dword [ebx + 0x8c]
push eax
push 4
lea ecx, [ebp - 0x10c]
push ecx
push edx
call esi
mov ecx, dword [ebp - 0x10c]
mov edx, dword [ebx + 0x8c]
push edi
mov edi, dword [ebp - 0x124]
lea eax, [ebp - 0x104]
push eax
push ecx
push edi
push edx
call esi
push edi
call fcn.004575de
mov eax, dword [ebp - 0x128]
push eax
call fcn.004575de
mov ecx, dword [ebp - 4]
add esp, 8
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.005520da
mov esp, ebp
pop ebp
ret