Function at 0x4ec1d0
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x52bb78
mov eax, dword fs:[0]
push eax
sub esp, 0x114
mov eax, dword [0x584f80]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, dword [ebp + 8]
lea eax, [ebp - 0xa0]
mov edi, dword [ebp + 0xc]
mov dword [ebp - 0x120], esi
push eax
mov dword [ebp - 0x110], esi
mov dword [ebp - 0x108], edi
mov dword [ebp - 0x114], 1
call fcn.004b18c0
push 0x5c
push eax
lea eax, [ebp - 0x88]
mov dword [ebp - 4], 0
push eax
call fcn.004c1c80
push str.WMF.tmp
push eax
lea eax, [ebp - 0x58]
mov byte [ebp - 4], 1
push eax
call fcn.00482be0
add esp, 0x1c
mov ecx, dword [ebp - 0x74]
mov byte [ebp - 4], 3
cmp ecx, 7
jbe 0x4ec294
mov edx, dword [ebp - 0x88]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x4ec28a
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4ec2e1
push ecx
push edx
call fcn.0050686b
add esp, 8
xor eax, eax
mov dword [ebp - 0x78], 0
mov dword [ebp - 0x74], 7
mov word [ebp - 0x88], ax
mov ecx, dword [ebp - 0x8c]
mov byte [ebp - 4], 4
cmp ecx, 7
jbe 0x4ec2f1
mov edx, dword [ebp - 0xa0]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x4ec2e7
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x4ec2e7
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edx
call fcn.0050686b
add esp, 8
mov ecx, edi
mov dword [ebp - 0x90], 0
xor eax, eax
mov dword [ebp - 0x8c], 7
xorps xmm0, xmm0
mov word [ebp - 0xa0], ax
movups xmmword [ebp - 0x70], xmm0
mov dword [ebp - 0x60], eax
lea edx, [ecx + 2]
mov dword [ebp - 0x5c], eax
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4ec320
sub ecx, edx
sar ecx, 1
push ecx
push edi
lea ecx, [ebp - 0x70]
call fcn.0045bfe0
lea eax, [ebp - 0x70]
mov byte [ebp - 4], 5
push eax
lea eax, [ebp - 0x28]
push eax
call fcn.004c24d0
mov ecx, dword [ebp - 0x5c]
add esp, 8
mov byte [ebp - 4], 4
cmp ecx, 7
jbe 0x4ec38b
mov edx, dword [ebp - 0x70]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x4ec381
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4ec445
push ecx
push edx
call fcn.0050686b
add esp, 8
push 0x5c
lea eax, [ebp - 0x58]
mov byte [ebp - 4], 6
push eax
lea eax, [ebp - 0x40]
push eax
call fcn.004c1c80
add esp, 0xc
lea ecx, [ebp - 0x28]
mov byte [ebp - 4], 7
push ecx
push eax
push dword [ebp - 0x120]
mov ecx, esi
call fcn.00485030
mov dword [ebp - 0x114], 7
mov ecx, dword [ebp - 0x2c]
mov dword [ebp - 4], 9
cmp ecx, 7
jbe 0x4ec3fe
mov edx, dword [ebp - 0x40]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x4ec3f4
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4ec445
push ecx
push edx
call fcn.0050686b
add esp, 8
xor eax, eax
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x2c], 7
mov word [ebp - 0x40], ax
mov ecx, dword [ebp - 0x14]
mov dword [ebp - 4], 0xa
cmp ecx, 7
jbe 0x4ec455
mov edx, dword [ebp - 0x28]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x4ec44b
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x4ec44b
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edx
call fcn.0050686b
add esp, 8
xor eax, eax
mov dword [ebp - 0x18], 0
mov word [ebp - 0x28], ax
lea eax, [ebp - 0x58]
push eax
mov dword [ebp - 0x14], 7
call fcn.0049ddc0
add esp, 4
mov eax, esi
cmp dword [esi + 0x14], 7
jbe 0x4ec47f
mov eax, dword [esi]
push 0
push eax
push edi
call fcn.0049cb30
cmp dword [ebp - 0x44], 7
lea eax, [ebp - 0x58]
cmova eax, dword [ebp - 0x58]
push eax
call fcn.004e3c20
add esp, 0x10
mov eax, esi
cmp dword [esi + 0x14], 7
jbe 0x4ec4a6
mov eax, dword [esi]
push eax
call fcn.004e3c20
xor edi, edi
xor esi, esi
add esp, 4
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0x18], edi
mov dword [ebp - 0x10c], esi
mov dword [ebp - 0x14], esi
push dword [ebp - 0x108]
lea ecx, [ebp - 0x100]
mov dword [ebp - 4], 0xb
call fcn.0045ce10
mov eax, dword [ebp - 0xe0]
add eax, 0xffffffea
mov dword [ebp - 0x11c], eax
je 0x4ec507
lea ecx, [ebp - 0x101]
push ecx
push eax
lea ecx, [ebp - 0x1c]
call fcn.004846f0
mov esi, dword [ebp - 0x14]
mov edi, dword [ebp - 0x1c]
mov dword [ebp - 0x10c], esi
push 0xa
push 0x538d64
push dword [ebp - 0x108]
xorps xmm0, xmm0
mov dword [ebp - 0x60], 0
movups xmmword [ebp - 0x70], xmm0
mov word [ebp - 0x5c], 0
call fcn.004c1a10
add esp, 0xc
mov dword [ebp - 0x118], eax
test eax, eax
jne 0x4ec6aa
push 0xf
xorps xmm0, xmm0
mov dword [ebp - 0x30], eax
push str.Cant_open_rb
lea ecx, [ebp - 0x40]
mov dword [ebp - 0x2c], eax
movups xmmword [ebp - 0x40], xmm0
call fcn.0045bfe0
push dword [ebp - 0x108]
lea eax, [ebp - 0x40]
mov byte [ebp - 4], 0xc
push eax
lea eax, [ebp - 0xb8]
push eax
call fcn.00482be0
add esp, 0xc
cmp dword [eax + 0x14], 7
mov byte [ebp - 4], 0xd
jbe 0x4ec583
mov eax, dword [eax]
push eax
call fcn.004ba510
mov ecx, dword [ebp - 0xa4]
add esp, 4
cmp ecx, 7
jbe 0x4ec5c8
mov edx, dword [ebp - 0xb8]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x4ec5be
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4ec611
push ecx
push edx
call fcn.0050686b
add esp, 8
mov ecx, dword [ebp - 0x2c]
xor eax, eax
mov dword [ebp - 0xa8], 0
mov dword [ebp - 0xa4], 7
mov word [ebp - 0xb8], ax
cmp ecx, 7
jbe 0x4ec621
mov edx, dword [ebp - 0x40]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x4ec617
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x4ec617
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edx
call fcn.0050686b
add esp, 8
test edi, edi
je 0x4ec64b
sub esi, edi
mov eax, edi
cmp esi, 0x1000
jb 0x4ec641
mov edi, dword [eax - 4]
add esi, 0x23
sub eax, edi
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4ec677
push esi
push edi
call fcn.0050686b
add esp, 8
mov ecx, dword [ebp - 0x44]
cmp ecx, 7
jbe 0x4ec687
mov edx, dword [ebp - 0x58]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x4ec67d
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x4ec67d
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edx
call fcn.0050686b
add esp, 8
mov esi, dword [ebp - 0x110]
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00506d06
mov esp, ebp
pop ebp
ret
mov esi, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
push eax
push 0x16
lea eax, [ebp - 0x70]
push 1
push eax
call esi
push dword [ebp - 0x118]
push dword [ebp - 0x11c]
push 1
push edi
call esi
push dword [ebp - 0x118]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
mov esi, dword [ebp - 0x110]
add esp, 0x24
mov eax, esi
cmp dword [esi + 0x14], 7
jbe 0x4ec6eb
mov eax, dword [esi]
push 0xa
push 0x53f168
push eax
call fcn.004c1a10
add esp, 0xc
mov dword [ebp - 0x114], eax
test eax, eax
jne 0x4ec77c
test edi, edi
je 0x4ec739
mov ecx, dword [ebp - 0x10c]
mov eax, edi
sub ecx, edi
cmp ecx, 0x1000
jb 0x4ec72f
mov edi, dword [eax - 4]
add ecx, 0x23
sub eax, edi
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4ec7ff
push ecx
push edi
call fcn.0050686b
add esp, 8
mov ecx, dword [ebp - 0x44]
cmp ecx, 7
jbe 0x4ec68d
mov edx, dword [ebp - 0x58]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x4ec76d
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4ec7ff
push ecx
push edx
call fcn.0050686b
add esp, 8
jmp 0x4ec68d
push eax
push dword [ebp - 0x11c]
push 1
push edi
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
push dword [ebp - 0x114]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
add esp, 0x14
test edi, edi
je 0x4ec7cb
mov ecx, dword [ebp - 0x10c]
mov eax, edi
sub ecx, edi
cmp ecx, 0x1000
jb 0x4ec7c1
mov edi, dword [eax - 4]
add ecx, 0x23
sub eax, edi
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4ec7ff
push ecx
push edi
call fcn.0050686b
add esp, 8
mov ecx, dword [ebp - 0x44]
cmp ecx, 7
jbe 0x4ec68d
mov edx, dword [ebp - 0x58]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x4ec76d
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x4ec76d
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3