Function at 0x451ce4
Capabilities:
Get file size
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
mov ecx, 0x14
push 0
push 0
dec ecx
jne 0x451ced
xchg dword [ebp - 4], ecx
push ebx
push esi
push edi
mov esi, ecx
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
call fcn.00407000
mov eax, dword [ebp - 8]
call fcn.00407000
mov eax, dword [ebp + 8]
call fcn.0040a7b0
xor eax, eax
push ebp
push 0x4523ed
push dword fs:[eax]
mov dword fs:[eax], esp
xor ebx, ebx
cmp dword [ebp - 4], 0
jne 0x451eb2
lea edx, [ebp - 0xc]
mov eax, dword [ebp + 8]
call fcn.0045166c
cmp byte [ebp + 0xc], 0
jne 0x451e94
mov eax, 0xfa
call fcn.004392dc
test al, al
je 0x451d63
push 0
call sub.user32.dll_MessageBeep
jmp 0x45239c
push 0x7fffffff
mov ecx, 1
mov edx, dword [ebp - 0xc]
mov eax, 0x45240c
call fcn.00410440
test eax, eax
jle 0x451da7
lea edx, [ebp - 0x88]
mov eax, dword [ebp - 0xc]
call fcn.00438070
mov edx, dword [ebp - 0x88]
lea eax, [ebp - 0xc]
call fcn.004068ac
lea edx, [ebp - 0x10]
mov eax, dword [ebp - 0xc]
call fcn.00437e70
jmp 0x451dc5
lea eax, [ebp - 0x8c]
call fcn.00451ba8
mov edx, dword [ebp - 0x8c]
lea eax, [ebp - 0x10]
mov ecx, 0
call fcn.004079bc
lea edx, [ebp - 0x90]
mov eax, dword [ebp - 0xc]
call fcn.00437df4
mov edx, dword [ebp - 0x90]
lea eax, [ebp - 0xc]
call fcn.004068ac
lea eax, [ebp - 0xc]
mov edx, 0x45241c
call fcn.00406bf4
lea eax, [ebp - 0xc]
xor ecx, ecx
mov edx, 0x105
call fcn.004072f4
lea eax, [ebp - 0x84]
mov edx, 0x58
call fcn.0040da54
mov dword [ebp - 0x84], 0x58
mov dword [ebp - 0x80], esi
mov eax, dword [ebp - 0x10]
call fcn.00407010
mov dword [ebp - 0x58], eax
mov eax, 0x452420
mov dword [ebp - 0x78], eax
mov dword [ebp - 0x6c], 1
mov eax, dword [ebp - 0xc]
call fcn.00407010
mov dword [ebp - 0x68], eax
mov dword [ebp - 0x64], 0x104
lea edx, [ebp - 0x14]
mov eax, dword [ebp + 8]
mov ecx, dword [eax]
call dword [ecx + 0x254]
mov eax, dword [ebp - 0x14]
call fcn.00407010
mov dword [ebp - 0x54], eax
mov eax, 0x452430
mov dword [ebp - 0x48], eax
mov dword [ebp - 0x50], 0x8004
lea eax, [ebp - 0x84]
push eax
call sub.comdlg32.dll_GetSaveFileNameA
test eax, eax
je 0x45239c
lea eax, [ebp - 0xc]
mov edx, dword [ebp - 0x68]
mov ecx, 0
call fcn.00406ae0
jmp 0x451ebd
lea edx, [ebp - 0x94]
mov eax, dword [ebp - 0xc]
call fcn.00438070
mov edx, dword [ebp - 0x94]
lea eax, [ebp - 0xc]
call fcn.004068ac
jmp 0x451ebd
lea eax, [ebp - 0xc]
mov edx, dword [ebp - 4]
call fcn.004068ac
push ebp
mov eax, dword [ebp - 0xc]
call fcn.00451768
pop ecx
push 0
push 0
push 4
push 0
push 0
push 0xc0000000
mov eax, dword [ebp - 0xc]
call fcn.00407010
push eax
call sub.kernel32.dll_CreateFileA
mov esi, eax
cmp esi, 0xffffffff
je 0x45239c
mov eax, dword [ebp + 8]
mov edx, dword [eax]
call dword [edx + 0x1a8]
test al, al
je 0x452324
push 0
push esi
call sub.kernel32.dll_GetFileSize_1
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0xc]
call fcn.004067fc
cmp dword [ebp - 0x1c], 0
jbe 0x451fd5
lea ecx, [ebp - 0xc]
mov edx, 0x452444
mov eax, dword [ebp - 8]
call fcn.0045184c
lea eax, [ebp - 0xc]
xor edx, edx
call fcn.00406a28
call fcn.00406bc0
cmp eax, 0x1f
jne 0x451fcd
lea ecx, [ebp - 0x98]
mov edx, 0x452460
mov eax, dword [ebp - 8]
call fcn.0045184c
cmp dword [ebp - 0x98], 0
je 0x451f7d
mov eax, dword [ebp + 8]
mov edx, dword [eax]
call dword [edx + 0x1b8]
mov ebx, eax
mov eax, dword [ebp + 8]
mov edx, dword [eax]
call dword [edx + 0x1c8]
jmp 0x451f95
mov eax, dword [ebp + 8]
mov edx, dword [eax]
call dword [edx + 0x1c0]
mov ebx, eax
mov eax, dword [ebp + 8]
mov edx, dword [eax]
call dword [edx + 0x1d0]
test bl, bl
jne 0x451fa3
lea eax, [ebp - 0xc]
call fcn.004067fc
jmp 0x451fd5
sub al, 1
jb 0x451fab
je 0x451fbc
jmp 0x451fd5
lea eax, [ebp - 0xc]
xor ecx, ecx
mov edx, 9
call fcn.004072f4
jmp 0x451fd5
lea eax, [ebp - 0xc]
xor ecx, ecx
mov edx, 0x14
call fcn.004072f4
jmp 0x451fd5
lea eax, [ebp - 0xc]
call fcn.004067fc
mov eax, dword [ebp + 8]
mov edx, dword [eax]
call dword [edx + 0x1b0]
test eax, eax
jbe 0x451ff4
mov eax, dword [ebp + 8]
mov edx, dword [eax]
call dword [edx + 0x1b0]
cmp eax, dword [ebp - 0x1c]
jb 0x451ff8
xor ebx, ebx
jmp 0x451ffa
mov bl, 1
test bl, bl
jne 0x452008
cmp dword [ebp - 0xc], 0
je 0x452316
push 0
push 0
push 0
push 4
push 0
push esi
call sub.kernel32.dll_CreateFileMappingW
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x28], 0
je 0x452316
push 0
push 0
push 0
push 0xf001f
mov eax, dword [ebp - 0x28]
push eax
call sub.kernel32.dll_MapViewOfFile
mov dword [ebp - 0x2c], eax
cmp dword [ebp - 0x2c], 0
je 0x45230d
cmp dword [ebp - 0xc], 0
je 0x45228b
mov edi, dword [ebp - 0x1c]
mov eax, dword [ebp - 0x1c]
push eax
push 0
dec edi
push edi
push 0
lea eax, [ebp - 0xc]
xor edx, edx
call fcn.00406a28
call fcn.00406bc0
add eax, 2
push eax
lea eax, [ebp - 0x9c]
mov ecx, dword [ebp - 0xc]
mov edx, 0x45247c
call fcn.00406cbc
mov eax, dword [ebp - 0x9c]
call fcn.00407010
mov edx, dword [ebp - 0x2c]
pop ecx
call fcn.00410630
mov edi, eax
test edi, edi
jl 0x452282
mov eax, dword [ebp - 0x1c]
push eax
push 0
push edi
push 0
mov eax, 0x452480
mov ecx, 0xb
mov edx, dword [ebp - 0x2c]
call fcn.00410630
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0
jge 0x4520e6
mov eax, dword [ebp - 0x1c]
push eax
push 0
push 0
push 0
mov eax, 0x45248c
mov ecx, 9
mov edx, dword [ebp - 0x2c]
call fcn.00410630
mov dword [ebp - 0x20], eax
jmp 0x4520ea
add dword [ebp - 0x20], 2
cmp dword [ebp - 0x20], 0
jl 0x452282
mov eax, dword [ebp - 0x1c]
push eax
push 0
push edi
push 0x7fffffff
mov eax, 0x452480
mov ecx, 0xb
mov edx, dword [ebp - 0x2c]
call fcn.00410630
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0
jge 0x452123
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x24], eax
jmp 0x452127
add dword [ebp - 0x24], 2
push 0
mov ecx, dword [ebp - 0x24]
sub ecx, dword [ebp - 0x20]
mov edx, dword [ebp - 0x2c]
add edx, dword [ebp - 0x20]
lea eax, [ebp - 0x10]
call fcn.00406934
mov ecx, 0x4524a4
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 0x10]
call fcn.00451b14
test al, al
je 0x452282
mov ecx, 0x4524bc
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 0x10]
call fcn.00451b14
test al, al
je 0x452282
mov ecx, 0x452460
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 0x10]
call fcn.00451b14
test al, al
je 0x452282
mov ecx, 0x4524d8
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 0x10]
call fcn.00451b14
test al, al
je 0x452282
lea ecx, [ebp - 0xa0]
mov edx, 0x4524d8
mov eax, dword [ebp - 0x10]
call fcn.0045184c
cmp dword [ebp - 0xa0], 0
jne 0x4521e9
mov ecx, 0x4524ec
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 0x10]
call fcn.00451b14
test al, al
je 0x452282
mov ecx, 0x452508
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 0x10]
call fcn.00451b14
test al, al
je 0x452282
lea ecx, [ebp - 0xc]
mov edx, 0x452528
mov eax, dword [ebp - 0x10]
call fcn.0045184c
cmp dword [ebp - 0xc], 0
je 0x452225
lea eax, [ebp - 0xc]
xor edx, edx
call fcn.00406a28
call fcn.00406bc0
push eax
mov eax, dword [ebp - 0xc]
call fcn.00407010
mov edx, eax
xor eax, eax
pop ecx
call fcn.00411abc
mov edi, eax
jmp 0x45222a
mov edi, 1
lea eax, [ebp - 0xa4]
push eax
lea eax, [edi + 1]
mov cl, 0x30
mov edx, 1
call fcn.00411760
mov eax, dword [ebp - 0xa4]
push eax
lea eax, [ebp - 8]
mov ecx, 0x452444
mov edx, 0x452528
call fcn.00451998
mov eax, dword [ebp - 0x24]
cmp eax, dword [ebp - 0x1c]
jae 0x452277
mov ecx, dword [ebp - 0x1c]
sub ecx, eax
mov edx, dword [ebp - 0x2c]
add edx, dword [ebp - 0x20]
mov eax, dword [ebp - 0x2c]
add eax, dword [ebp - 0x24]
call fcn.00404460
mov eax, dword [ebp - 0x24]
sub eax, dword [ebp - 0x20]
sub dword [ebp - 0x1c], eax
jmp 0x45228b
cmp edi, 0xffffffff
jne 0x452053
test bl, bl
je 0x452304
push 0
push 0
push 0
push esi
call sub.kernel32.dll_SetFilePointer_1
xor edi, edi
mov eax, dword [ebp - 0x1c]
push eax
push 0
inc edi
push edi
push 0x7fffffff
mov eax, 0x452480
mov ecx, 0xb
mov edx, dword [ebp - 0x2c]
call fcn.00410630
mov edi, eax
cmp edi, 0xffffffff
je 0x4522e9
mov eax, dword [ebp + 8]
mov edx, dword [eax]
call dword [edx + 0x1b0]
mov ebx, eax
mov eax, dword [ebp + 8]
mov edx, dword [eax]
call dword [edx + 0x1b0]
shr eax, 2
sub ebx, eax
mov eax, dword [ebp - 0x1c]
sub eax, edi
cmp ebx, eax
jbe 0x45229d
cmp edi, 0xffffffff
je 0x452304
add edi, 2
sub dword [ebp - 0x1c], edi
mov edx, dword [ebp - 0x2c]
mov eax, dword [ebp - 0x2c]
add eax, edi
mov ecx, dword [ebp - 0x1c]
call fcn.00404460
mov eax, dword [ebp - 0x2c]
push eax
call sub.kernel32.dll_UnmapViewOfFile
mov eax, dword [ebp - 0x28]
push eax
call sub.kernel32.dll_CloseHandle_1
push 0
push 0
mov eax, dword [ebp - 0x1c]
push eax
push esi
call sub.kernel32.dll_SetFilePointer_1
push dword [ebp - 8]
push 0x45253c
push 0x45253c
lea eax, [ebp - 8]
mov edx, 3
call fcn.00406dac
push 0
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 8]
xor edx, edx
call fcn.00406a28
call fcn.00406bc0
push eax
mov eax, dword [ebp - 8]
push eax
push esi
call sub.kernel32.dll_WriteFile_1
push esi
call sub.kernel32.dll_SetEndOfFile_1
push esi
call sub.kernel32.dll_CloseHandle_1
cmp dword [ebp - 4], 0
sete al
and al, byte [ebp + 0xc]
je 0x45239a
lea eax, [ebp - 0x18]
call fcn.0040a73c
push eax
push 0x452540
mov eax, dword [ebp + 8]
push eax
mov eax, dword [eax]
call dword [eax]
test eax, eax
jne 0x45239a
mov dl, 1
mov eax, dword [ebp - 0x18]
mov ecx, dword [eax]
call dword [ecx + 0x24]
mov bl, 1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4523f4
lea eax, [ebp - 0xa4]
mov edx, 6
call fcn.00406820
lea eax, [ebp - 0x8c]
call fcn.00407758
lea eax, [ebp - 0x88]
call fcn.004067fc
lea eax, [ebp - 0x18]
call fcn.0040a73c
lea eax, [ebp - 0x14]
mov edx, 5
call fcn.00406820
lea eax, [ebp + 8]
call fcn.0040a73c
ret