Function at 0x459220
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x1dc
mov dword [ebp - 0x1c8], eax
mov dword [ebp - 0x1c0], edx
mov dword [ebp - 0x1c4], ecx
mov al, byte [ebp + 8]
mov byte [ebp - 0x1c9], al
lea edx, [ebp - 0xc8]
mov dword [esp], edx
call fcn.0052e6a8
mov dword [ebp - 0xc8], 0x57d8f0
mov dword [ebp - 0x58], 0
mov byte [ebp - 0x54], 0
mov byte [ebp - 0x53], 0
mov dword [ebp - 0x50], 0
mov dword [ebp - 0x4c], 0
mov dword [ebp - 0x48], 0
mov dword [ebp - 0x44], 0
mov ecx, dword [0x578008]
mov dword [ebp - 0xfc], ecx
mov eax, dword [ecx - 0xc]
mov edx, dword [0x57800c]
mov dword [ebp + eax - 0xfc], edx
mov dword [ebp - 0xf8], 0
mov dword [esp + 4], 0
mov eax, dword [ebp - 0xfc]
lea ecx, [ebp - 0xfc]
add ecx, dword [eax - 0xc]
mov dword [esp], ecx
call fcn.0052f738
mov eax, dword [0x578010]
mov dword [ebp - 0xf4], eax
mov eax, dword [eax - 0xc]
mov ecx, dword [0x578014]
mov dword [ebp + eax - 0xf4], ecx
mov dword [esp + 4], 0
mov eax, dword [ebp - 0xf4]
lea edx, [ebp - 0xf4]
add edx, dword [eax - 0xc]
mov dword [esp], edx
call fcn.0052f738
mov ecx, dword [0x578004]
mov eax, dword [ecx - 0xc]
mov edx, dword [0x578018]
mov dword [ebp + eax - 0xfc], edx
mov dword [ebp - 0xfc], 0x57d26c
mov dword [ebp - 0xc8], 0x57d294
mov dword [ebp - 0xf4], 0x57d280
mov dword [ebp - 0xf0], vtable.c_streambufIwSt11char_traitsIwEE.0
mov dword [ebp - 0xec], 0
mov dword [ebp - 0xe8], 0
mov dword [ebp - 0xe4], 0
mov dword [ebp - 0xe0], 0
mov dword [ebp - 0xdc], 0
mov dword [ebp - 0xd8], 0
lea ecx, [ebp - 0xd4]
mov dword [esp], ecx
call fcn.0052760c
mov dword [ebp - 0xf0], 0x57cec8
mov dword [ebp - 0xd0], 0x18
mov dword [ebp - 0xcc], 0x55a160
lea eax, [ebp - 0xf0]
mov dword [esp + 4], eax
lea edx, [ebp - 0xc8]
mov dword [esp], edx
call fcn.0052f738
lea edx, [ebp - 0x184]
mov dword [esp], edx
call fcn.0052e6a8
mov dword [ebp - 0x184], 0x57d8f0
mov dword [ebp - 0x114], 0
mov byte [ebp - 0x110], 0
mov byte [ebp - 0x10f], 0
mov dword [ebp - 0x10c], 0
mov dword [ebp - 0x108], 0
mov dword [ebp - 0x104], 0
mov dword [ebp - 0x100], 0
mov ecx, dword [0x578008]
mov dword [ebp - 0x1b8], ecx
mov eax, dword [ecx - 0xc]
mov edx, dword [0x57800c]
mov dword [ebp + eax - 0x1b8], edx
mov dword [ebp - 0x1b4], 0
mov dword [esp + 4], 0
mov eax, dword [ebp - 0x1b8]
lea ecx, [ebp - 0x1b8]
add ecx, dword [eax - 0xc]
mov dword [esp], ecx
call fcn.0052f738
mov eax, dword [0x578010]
mov dword [ebp - 0x1b0], eax
mov eax, dword [eax - 0xc]
mov ecx, dword [0x578014]
mov dword [ebp + eax - 0x1b0], ecx
mov dword [esp + 4], 0
mov eax, dword [ebp - 0x1b0]
lea edx, [ebp - 0x1b0]
add edx, dword [eax - 0xc]
mov dword [esp], edx
call fcn.0052f738
mov ecx, dword [0x578004]
mov eax, dword [ecx - 0xc]
mov edx, dword [0x578018]
mov dword [ebp + eax - 0x1b8], edx
mov dword [ebp - fcn.005202ac], 0x57d26c
mov dword [ebp - 0x184], 0x57d294
mov dword [ebp - 0x1b0], 0x57d280
mov dword [ebp - method.c_streambufIwSt11char_traitsIwEE.virtual_0], vtable.c_streambufIwSt11char_traitsIwEE.0
mov dword [ebp - 0x1a8], 0
mov dword [ebp - 0x1a4], 0
mov dword [ebp - 0x1a0], 0
mov dword [ebp - 0x19c], 0
mov dword [ebp - 0x198], 0
mov dword [ebp - 0x194], 0
lea ecx, [ebp - 0x190]
mov dword [esp], ecx
call fcn.0052760c
mov dword [ebp - fcn.0051a960], 0x57cec8
mov dword [ebp - 0x18c], 0x18
mov dword [ebp - 0x188], 0x55a160
lea eax, [ebp - 0x1ac]
mov dword [esp + 4], eax
lea edx, [ebp - 0x184]
mov dword [esp], edx
call fcn.0052f738
mov ecx, dword [ebp - 0x1c0]
mov eax, dword [ecx]
mov ecx, dword [eax - 0xc]
test ecx, ecx
je 0x45961c
xor esi, esi
jmp 0x4595b3
mov byte [ebx + 0x74], 0x30
mov eax, dword [ebp - 0xf4]
mov eax, dword [eax - 0xc]
mov dword [ebp + eax - 0xec], 2
movzx eax, byte [ebp - 0x1bc]
mov dword [esp + 4], eax
lea edx, [ebp - 0xf4]
mov dword [esp], edx
call fcn.00507608
inc esi
mov ecx, dword [ebp - 0x1c0]
mov eax, dword [ecx]
cmp esi, dword [eax - 0xc]
jae 0x45961c
mov al, byte [eax + esi]
mov byte [ebp - 0x1bc], al
mov eax, dword [ebp - 0xf4]
lea ebx, [ebp - 0xf4]
add ebx, dword [eax - 0xc]
mov eax, dword [ebx + 0xc]
and eax, 0xffffffb5
or eax, 8
mov dword [ebx + 0xc], eax
cmp byte [ebx + 0x75], 0
jne 0x459574
mov edi, dword [ebx + 0x7c]
test edi, edi
je 0x459c78
cmp byte [edi + 0x1c], 0
je 0x459600
mov al, byte [edi + 0x3d]
mov byte [ebx + 0x74], al
mov byte [ebx + 0x75], 1
jmp 0x459574
mov dword [esp], edi
call fcn.004e5a38
mov eax, dword [edi]
mov dword [esp + 4], 0x20
mov dword [esp], edi
call dword [eax + 0x18]
jmp 0x4595f1
mov edx, dword [ebp - 0x1c4]
mov eax, dword [edx]
mov edx, dword [eax - 0xc]
test edx, edx
je 0x4596dc
xor esi, esi
jmp 0x459673
mov byte [ebx + 0x74], 0x30
mov eax, dword [ebp - 0x1b0]
mov eax, dword [eax - 0xc]
mov dword [ebp + eax - 0x1a8], 2
movzx eax, byte [ebp - 0x1bc]
mov dword [esp + 4], eax
lea ecx, [ebp - 0x1b0]
mov dword [esp], ecx
call fcn.00507608
inc esi
mov edx, dword [ebp - 0x1c4]
mov eax, dword [edx]
cmp esi, dword [eax - 0xc]
jae 0x4596dc
mov al, byte [eax + esi]
mov byte [ebp - 0x1bc], al
mov eax, dword [ebp - 0x1b0]
lea ebx, [ebp - 0x1b0]
add ebx, dword [eax - 0xc]
mov eax, dword [ebx + 0xc]
and eax, 0xffffffb5
or eax, 8
mov dword [ebx + 0xc], eax
cmp byte [ebx + 0x75], 0
jne 0x459634
mov edi, dword [ebx + 0x7c]
test edi, edi
je 0x459c7d
cmp byte [edi + 0x1c], 0
je 0x4596c0
mov al, byte [edi + 0x3d]
mov byte [ebx + 0x74], al
mov byte [ebx + 0x75], 1
jmp 0x459634
mov dword [esp], edi
call fcn.004e5a38
mov eax, dword [edi]
mov dword [esp + 4], 0x20
mov dword [esp], edi
call dword [eax + 0x18]
jmp 0x4596b1
mov ecx, dword [ebp - 0x1c8]
mov esi, dword [ecx]
mov dword [esp + 4], 0x565433
mov dword [esp], esi
call sub.msvcrt.dll_fopen
mov ebx, eax
test eax, eax
je 0x459a82
mov dword [ebp - 0x28], 0x55a160
mov eax, dword [ebp - 0xdc]
test eax, eax
je 0x459b74
mov edx, dword [ebp - 0xe4]
cmp eax, edx
ja 0x45992f
mov byte [esp + 0xc], 0
lea eax, [ebp - 0x1a]
mov dword [esp + 8], eax
mov dword [esp + 4], edx
mov eax, dword [ebp - 0xe0]
mov dword [esp], eax
lea esi, [ebp - 0x28]
call fcn.00508240
mov dword [ebp - 0x30], eax
lea eax, [ebp - 0x30]
mov dword [esp + 4], eax
mov dword [esp], esi
call fcn.00508d84
lea edx, [ebp - 0x30]
mov dword [esp], edx
call fcn.0050a12c
mov dword [esp + 0xc], ebx
mov dword [esp + 8], 0x20
mov dword [esp + 4], 1
mov eax, dword [ebp - 0x28]
mov dword [esp], eax
call sub.msvcrt.dll_fwrite
mov eax, dword [ebp - 0x28]
lea esi, [eax - 0xc]
mov edi, 0x55a154
cmp esi, edi
jne 0x459fdf
mov dword [esp], ebx
call sub.msvcrt.dll_fclose
cmp byte [ebp - 0x1c9], 0
jne 0x459972
mov bl, 1
mov dword [ebp - fcn.005202ac], 0x57d26c
mov dword [ebp - 0x184], 0x57d294
mov dword [ebp - 0x1b0], 0x57d280
mov dword [ebp - fcn.0051a960], 0x57cec8
lea eax, [ebp - 0x188]
mov dword [esp], eax
call fcn.0050a12c
mov dword [ebp - method.c_streambufIwSt11char_traitsIwEE.virtual_0], vtable.c_streambufIwSt11char_traitsIwEE.0
lea eax, [ebp - 0x190]
mov dword [esp], eax
call fcn.00527844
mov edx, dword [0x578004]
mov eax, dword [edx - 0xc]
mov ecx, dword [0x578018]
mov dword [ebp + eax - 0x1b8], ecx
mov eax, dword [0x578010]
mov dword [ebp - 0x1b0], eax
mov eax, dword [eax - 0xc]
mov ecx, dword [0x578014]
mov dword [ebp + eax - 0x1b0], ecx
mov eax, dword [0x578008]
mov dword [ebp - 0x1b8], eax
mov eax, dword [eax - 0xc]
mov ecx, dword [0x57800c]
mov dword [ebp + eax - 0x1b8], ecx
mov dword [ebp - 0x1b4], 0
mov dword [ebp - 0x184], 0x57d8f0
lea eax, [ebp - 0x184]
mov dword [esp], eax
call fcn.0052e80c
mov dword [ebp - 0xfc], 0x57d26c
mov dword [ebp - 0xc8], 0x57d294
mov dword [ebp - 0xf4], 0x57d280
mov dword [ebp - 0xf0], 0x57cec8
lea eax, [ebp - 0xcc]
mov dword [esp], eax
call fcn.0050a12c
mov dword [ebp - 0xf0], vtable.c_streambufIwSt11char_traitsIwEE.0
lea edx, [ebp - 0xd4]
mov dword [esp], edx
call fcn.00527844
mov ecx, dword [0x578004]
mov eax, dword [ecx - 0xc]
mov edx, dword [0x578018]
mov dword [ebp + eax - 0xfc], edx
mov ecx, dword [0x578010]
mov dword [ebp - 0xf4], ecx
mov eax, dword [ecx - 0xc]
mov edx, dword [0x578014]
mov dword [ebp + eax - 0xf4], edx
mov ecx, dword [0x578008]
mov dword [ebp - 0xfc], ecx
mov eax, dword [ecx - 0xc]
mov edx, dword [0x57800c]
mov dword [ebp + eax - 0xfc], edx
mov dword [ebp - 0xf8], 0
mov dword [ebp - 0xc8], 0x57d8f0
lea ecx, [ebp - 0xc8]
mov dword [esp], ecx
call fcn.0052e80c
mov al, bl
add esp, 0x1dc
pop ebx
pop esi
pop edi
leave
ret
mov byte [esp + 0xc], 0
lea edx, [ebp - 0x1b]
mov dword [esp + 8], edx
mov dword [esp + 4], eax
mov eax, dword [ebp - 0xe0]
mov dword [esp], eax
lea esi, [ebp - 0x28]
call fcn.00508240
mov dword [ebp - 0x34], eax
lea eax, [ebp - 0x34]
mov dword [esp + 4], eax
mov dword [esp], esi
call fcn.00508d84
lea edx, [ebp - 0x34]
mov dword [esp], edx
call fcn.0050a12c
jmp 0x45975f
mov eax, dword [ebp - 0x1c8]
mov esi, dword [eax]
mov dword [esp + 4], 0x565449
mov dword [esp], esi
call sub.msvcrt.dll_fopen
mov ebx, eax
test eax, eax
je 0x459ba8
mov dword [esp + 0xc], eax
mov dword [esp + 8], 1
mov dword [esp + 4], 1
mov dword [esp], 0x56544b
call sub.msvcrt.dll_fwrite
mov dword [esp], ebx
call sub.msvcrt.dll_fclose
mov edx, dword [ebp - 0x1c8]
mov esi, dword [edx]
mov dword [esp + 4], 0x56544d
mov dword [esp], esi
call sub.msvcrt.dll_fopen
mov ebx, eax
test eax, eax
je 0x459c10
mov dword [ebp - 0x2c], 0x55a160
mov eax, dword [ebp - 0x198]
test eax, eax
je 0x459b8e
mov edx, dword [ebp - 0x1a0]
cmp eax, edx
jbe 0x459aec
mov byte [esp + 0xc], 0
lea edx, [ebp - 0x20]
mov dword [esp + 8], edx
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x19c]
mov dword [esp], eax
call fcn.00508240
mov dword [ebp - 0x40], eax
lea ecx, [ebp - 0x40]
mov dword [esp + 4], ecx
lea esi, [ebp - 0x2c]
mov dword [esp], esi
call fcn.00508d84
mov eax, dword [ebp - 0x40]
lea edx, [eax - 0xc]
mov dword [ebp - 0x1bc], edx
cmp edi, edx
jne 0x459ed2
mov dword [esp + 0xc], ebx
mov dword [esp + 8], 0x10
mov dword [esp + 4], 1
mov eax, dword [ebp - 0x2c]
mov dword [esp], eax
call sub.msvcrt.dll_fwrite
mov eax, dword [ebp - 0x2c]
lea esi, [eax - 0xc]
cmp edi, esi
jne 0x459cd7
mov dword [esp], ebx
call sub.msvcrt.dll_fclose
jmp 0x4597a6
lea eax, [ebp - 0x19]
mov dword [esp + 8], eax
mov dword [esp + 4], 0x565436
lea ebx, [ebp - 0x38]
mov dword [esp], ebx
call fcn.00509af0
xor eax, eax
mov ecx, 0xffffffff
mov edi, esi
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov dword [esp + 8], ecx
mov dword [esp + 4], esi
mov dword [esp], ebx
call fcn.00508920
mov dword [esp], 8
call fcn.00538b64
mov esi, eax
mov dword [esp + 4], ebx
mov dword [esp], eax
call fcn.005167d8
mov dword [esp + 8], 0x516950
mov dword [esp + 4], 0x572394
mov dword [esp], esi
call fcn.00539374
mov byte [esp + 0xc], 0
lea eax, [ebp - 0x1f]
mov dword [esp + 8], eax
mov dword [esp + 4], edx
mov eax, dword [ebp - 0x19c]
mov dword [esp], eax
call fcn.00508240
mov dword [ebp - 0x3c], eax
lea eax, [ebp - 0x3c]
mov dword [esp + 4], eax
lea esi, [ebp - 0x2c]
mov dword [esp], esi
call fcn.00508d84
mov eax, dword [ebp - 0x3c]
lea edx, [eax - 0xc]
mov dword [ebp - 0x1bc], edx
cmp edi, edx
je 0x459a48
cmp dword [0x554500], 0
jne 0x459de5
mov ecx, dword [ebp - 0x1bc]
mov eax, dword [ecx + 8]
lea edx, [eax - 1]
mov dword [ecx + 8], edx
test eax, eax
jg 0x459a48
lea eax, [ebp - 0x22]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x1bc]
mov dword [esp], eax
call fcn.005084ec
jmp 0x459a48
lea eax, [ebp - 0xcc]
mov dword [esp + 4], eax
lea esi, [ebp - 0x28]
mov dword [esp], esi
call fcn.00508d84
jmp 0x45975f
lea eax, [ebp - 0x188]
mov dword [esp + 4], eax
lea esi, [ebp - 0x2c]
mov dword [esp], esi
call fcn.00508d84
jmp 0x459a48
lea eax, [ebp - 0x1d]
mov dword [esp + 8], eax
mov dword [esp + 4], 0x565436
lea ebx, [ebp - 0x38]
mov dword [esp], ebx
call fcn.00509af0
xor eax, eax
or ecx, 0xffffffff
mov edi, esi
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov dword [esp + 8], ecx
mov dword [esp + 4], esi
mov dword [esp], ebx
call fcn.00508920
mov dword [esp], 8
call fcn.00538b64
mov esi, eax
mov dword [esp + 4], ebx
mov dword [esp], eax
call fcn.005167d8
mov dword [esp + 8], 0x516950
mov dword [esp + 4], 0x572394
mov dword [esp], esi
call fcn.00539374
lea eax, [ebp - 0x1e]
mov dword [esp + 8], eax
mov dword [esp + 4], 0x565436
lea ebx, [ebp - 0x38]
mov dword [esp], ebx
call fcn.00509af0
xor eax, eax
or ecx, 0xffffffff
mov edi, esi
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov dword [esp + 8], ecx
mov dword [esp + 4], esi
mov dword [esp], ebx
call fcn.00508920
mov dword [esp], 8
call fcn.00538b64
mov esi, eax
mov dword [esp + 4], ebx
mov dword [esp], eax
call fcn.005167d8
mov dword [esp + 8], 0x516950
mov dword [esp + 4], 0x572394
mov dword [esp], esi
call fcn.00539374
call fcn.00531e70
call fcn.00531e70
mov edi, eax
mov dword [esp], esi
mov dword [ebp - 0x1d0], edx
call fcn.0053905c
mov edx, dword [ebp - 0x1d0]
mov dword [esp], ebx
mov dword [ebp - 0x1d0], edx
call fcn.0050a12c
mov edx, dword [ebp - 0x1d0]
dec edx
je 0x459f0c
lea eax, [ebp - 0x1b8]
mov dword [esp], eax
call fcn.005202ac
lea edx, [ebp - 0xfc]
mov dword [esp], edx
call fcn.005202ac
mov dword [esp], edi
call sub.libgcc_s_dw2_1.dll__Unwind_Resume
cmp dword [0x554500], 0
jne 0x45a0ed
mov eax, dword [esi + 8]
lea edx, [eax - 1]
mov dword [esi + 8], edx
test eax, eax
jg 0x459a75
lea eax, [ebp - 0x23]
mov dword [esp + 4], eax
mov dword [esp], esi
call fcn.005084ec
jmp 0x459a75
mov dword [esp + 4], 0xffffffff
sub eax, 4
mov dword [esp], eax
call fcn.004dd8dc
jmp 0x459b4f
cmp dword [0x554500], 0
jne 0x459f54
mov ecx, dword [ebp - 0x1bc]
mov eax, dword [ecx + 8]
lea edx, [eax - 1]
mov dword [ecx + 8], edx
test eax, eax
jg 0x459a48
lea eax, [ebp - 0x21]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x1bc]
mov dword [esp], eax
call fcn.005084ec
jmp 0x459a48
mov dword [esp], edi
call fcn.00538d08
mov edx, eax
mov eax, dword [eax]
mov dword [esp], edx
call dword [eax + 8]
mov ebx, eax
mov dword [esp + 4], 0x56533e
mov dword [esp], 0x55a480
call fcn.00536748
mov dword [esp + 4], ebx
mov dword [esp], eax
call fcn.00536748
mov dword [esp], eax
call fcn.00534290
call fcn.00538ed4
xor ebx, ebx
jmp 0x4597a8
mov dword [esp + 4], 0xffffffff
sub eax, 4
mov dword [esp], eax
call fcn.004dd8dc
jmp 0x459eea
cmp dword [0x554500], 0
jne 0x45a0a1
mov eax, dword [esi + 8]
lea edx, [eax - 1]
mov dword [esi + 8], edx
test eax, eax
jg 0x459791
lea eax, [ebp - 0x1c]
mov dword [esp + 4], eax
mov dword [esp], esi
call fcn.005084ec
jmp 0x459791
mov dword [esp + 4], 0xffffffff
sub eax, 4
mov dword [esp], eax
call fcn.004dd8dc
jmp 0x459ff5
mov dword [esp + 4], 0xffffffff
sub eax, 4
mov dword [esp], eax
call fcn.004dd8dc
jmp 0x459ced