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

Disassembly:
push edi
push esi
push ebp
push ebx
push ecx
push edx
push eax
mov eax, 0x6860
call fcn.00418ae0
mov ecx, dword [esp + 0x6868]
mov edx, dword [esp + 0x6864]
mov eax, dword [esp + 0x6860]
mov esi, ecx
mov dword [esp + 0xc], edx
mov ebx, eax
lea eax, [esp + 0x5000]
push 0x410
push 0
push eax
call fcn.004195e0
lea ebp, [esp + 0x541c]
push 0x410
push 0
push ebp
call fcn.004195e0
lea eax, [esp + 0x5838]
push 0x410
push 0
push eax
call fcn.004195e0
add esp, 0x24
mov edx, ebx
mov ecx, edx
and edx, 0xfffffff0
pxor xmm0, xmm0
pcmpeqb xmm0, xmmword [edx]
pmovmskb eax, xmm0
and ecx, 0xf
shr eax, cl
bsf eax, eax
jne 0x40eac3
mov eax, edx
add edx, ecx
call fcn.00419690
mov edi, eax
lea eax, [esp + 0x6040]
push 0x411
push 0
push eax
call fcn.004195e0
lea eax, [esp + 0x645d]
push 0x411
push 0
push eax
call fcn.004195e0
lea eax, [esp + 0x5c48]
push 0x410
push 0
push eax
call fcn.004195e0
add esp, 0x24
push 0
add esi, 0x2c
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push 0x410
lea edx, [esp + 0x6044]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push 0x5c
lea eax, [esp + 0x6044]
push eax
call dword [sym.imp.MSVCR90.dll_strrchr]
add esp, 8
test eax, eax
je 0x40eb40
mov byte [eax + 1], 0
jmp 0x40eb48
mov byte [esp + 0x6040], 0
lea eax, [edi - 4]
push eax
push ebx
push ebp
call dword [sym.imp.MSVCR90.dll_strncpy]
mov byte [esp + edi + 0x5418], 0
push ebp
push str._s.html
push 0x410
lea eax, [esp + 0x5018]
push eax
call dword [sym.imp.MSVCR90.dll__snprintf]
push 0x5c
push ebx
call dword [sym.imp.MSVCR90.dll_strrchr]
add esp, 0x24
mov dword [esp + 0x10], eax
test eax, eax
je 0x40efdd
push 0x421508
lea eax, [esp + 0x5004]
push eax
call sub.avutil.dll_fopen_utf8
mov ebp, eax
mov eax, dword [esp + 0x18]
lea edx, [eax + 1]
add edi, ebx
sub edi, eax
push edi
push edx
lea ecx, [esp + 0x5830]
push ecx
call dword [sym.imp.MSVCR90.dll_strncpy]
add esp, 0x14
test ebp, ebp
je 0x40ee6a
lea eax, [esp + 0x6040]
push eax
push str._sloadswf.html
push 0x410
lea edx, [esp + 0x5c3c]
push edx
call dword [sym.imp.MSVCR90.dll__snprintf]
push 0x42151c
lea eax, [esp + 0x5c44]
push eax
call sub.avutil.dll_fopen_utf8
add esp, 0x18
mov edi, eax
test edi, edi
je 0x40ee62
lea eax, [esp + 0x800]
push edi
push 0x12e
push 1
push eax
call dword [sym.imp.MSVCR90.dll_fread]
push ebp
push 0x12e
push 1
lea eax, [esp + 0x81c]
push eax
call dword [sym.imp.MSVCR90.dll_fwrite]
mov dword [esp + 0x6884], 0
lea eax, [esp + 0x6884]
push eax
lea edx, [esp + 0x5844]
push edx
call sub.avutil.dll_Ordinal_5
add esp, 0x28
mov dword [esp], eax
cmp dword [esp], 0
jne 0x40f0c4
mov dword [esp + 8], esi
mov dword [esp + 4], ebx
mov eax, 0x431a
mov esi, eax
push edi
mov edx, 0x800
cmp esi, 0x800
mov ebx, esi
cmovg ebx, edx
push ebx
push 1
lea ecx, [esp + 0x100c]
push ecx
call dword [sym.imp.MSVCR90.dll_fread]
push ebp
push ebx
push 1
lea edx, [esp + 0x101c]
push edx
call dword [sym.imp.MSVCR90.dll_fwrite]
add esp, 0x20
sub esi, ebx
test esi, esi
jg 0x40ec71
mov esi, dword [esp + 8]
mov ebx, dword [esp + 4]
push dword [esp + 0xc]
push 0x421520
push ebp
call dword [sym.imp.MSVCR90.dll_fwprintf]
lea eax, [esp + 0x180c]
push edi
push 0x24
push 1
push eax
call dword [sym.imp.MSVCR90.dll_fread]
push ebp
push 0x24
push 1
lea eax, [esp + 0x1828]
push eax
call dword [sym.imp.MSVCR90.dll_fwrite]
push esi
push 0x421520
push ebp
call dword [sym.imp.MSVCR90.dll_fwprintf]
lea eax, [esp + 0x2038]
push edi
push 0x3a6
push 1
push eax
call dword [sym.imp.MSVCR90.dll_fread]
push ebp
push 0x3a6
push 1
lea eax, [esp + 0x2054]
push eax
call dword [sym.imp.MSVCR90.dll_fwrite]
mov dword [esp + 0x68c0], 0
lea eax, [esp + 0x68c0]
push eax
lea edx, [esp + 0x587c]
push edx
call sub.avutil.dll_Ordinal_5
add esp, 0x60
mov edx, eax
test edx, edx
jne 0x40efed
lea eax, [esp + 0x2800]
push edi
push 0x186
push 1
push eax
call dword [sym.imp.MSVCR90.dll_fread]
push ebp
push 0x186
push 1
lea eax, [esp + 0x281c]
push eax
call dword [sym.imp.MSVCR90.dll_fwrite]
push esi
push 0x421520
push ebp
call dword [sym.imp.MSVCR90.dll_fwprintf]
lea eax, [esp + 0x302c]
push edi
push 0x12
push 1
push eax
call dword [sym.imp.MSVCR90.dll_fread]
push ebp
push 0x12
push 1
lea eax, [esp + 0x3048]
push eax
call dword [sym.imp.MSVCR90.dll_fwrite]
push dword [esp + 0x58]
push 0x421520
push ebp
call dword [sym.imp.MSVCR90.dll_fwprintf]
lea eax, [esp + 0x3858]
push edi
push 0x37e
push 1
push eax
call dword [sym.imp.MSVCR90.dll_fread]
push ebp
push 0x37e
push 1
lea eax, [esp + 0x3874]
push eax
call dword [sym.imp.MSVCR90.dll_fwrite]
add esp, 0x78
push dword [esp + 0xc]
push 0x421520
push ebp
call dword [sym.imp.MSVCR90.dll_fwprintf]
lea eax, [esp + 0x400c]
push edi
push 0x14
push 1
push eax
call dword [sym.imp.MSVCR90.dll_fread]
push ebp
push 0x14
push 1
lea eax, [esp + 0x4028]
push eax
call dword [sym.imp.MSVCR90.dll_fwrite]
push esi
push 0x421520
push ebp
call dword [sym.imp.MSVCR90.dll_fwprintf]
lea esi, [esp + 0x4838]
push edi
push 0x1dc
push 1
push esi
call dword [sym.imp.MSVCR90.dll_fread]
push ebp
push 0x1dc
push 1
push esi
call dword [sym.imp.MSVCR90.dll_fwrite]
push edi
call dword [sym.imp.MSVCR90.dll_fclose]
add esp, 0x5c
push ebp
call dword [sym.imp.MSVCR90.dll_fclose]
pop ecx
mov eax, dword [esp + 0x10]
mov byte [eax], 0
lea edx, [esp + 0x6040]
push edx
push 0x421528
push 0x410
lea ecx, [esp + 0x5c3c]
push ecx
call dword [sym.imp.MSVCR90.dll__snprintf]
push 0x42151c
lea eax, [esp + 0x5c44]
push eax
call sub.avutil.dll_fopen_utf8
add esp, 0x18
mov edi, eax
test edi, edi
je 0x40ef27
push ebx
push str._sloadswf.swf
push 0x410
lea eax, [esp + 0x582c]
push eax
call dword [sym.imp.MSVCR90.dll__snprintf]
push 0x421508
lea eax, [esp + 0x5834]
push eax
call sub.avutil.dll_fopen_utf8
add esp, 0x18
mov esi, eax
test esi, esi
je 0x40ef1f
push edi
call dword [sym.imp.MSVCR90.dll_feof]
pop ecx
test eax, eax
jne 0x40ef17
lea ebp, [esp]
push edi
push 0x800
push 1
push ebp
call dword [sym.imp.MSVCR90.dll_fread]
push esi
push eax
push 1
push ebp
call dword [sym.imp.MSVCR90.dll_fwrite]
push edi
call dword [sym.imp.MSVCR90.dll_feof]
add esp, 0x24
test eax, eax
je 0x40eeef
push esi
call dword [sym.imp.MSVCR90.dll_fclose]
pop ecx
push edi
call dword [sym.imp.MSVCR90.dll_fclose]
pop ecx
lea eax, [esp + 0x6040]
push eax
push 0x421548
push 0x410
lea edx, [esp + 0x5c3c]
push edx
call dword [sym.imp.MSVCR90.dll__snprintf]
push 0x42151c
lea eax, [esp + 0x5c44]
push eax
call sub.avutil.dll_fopen_utf8
add esp, 0x18
mov esi, eax
test esi, esi
je 0x40efdd
push ebx
push str._sSteelExternalAll.swf
push 0x410
lea eax, [esp + 0x582c]
push eax
call dword [sym.imp.MSVCR90.dll__snprintf]
push 0x421508
lea eax, [esp + 0x5834]
push eax
call sub.avutil.dll_fopen_utf8
add esp, 0x18
mov ebp, eax
test ebp, ebp
je 0x40efd5
push esi
call dword [sym.imp.MSVCR90.dll_feof]
pop ecx
test eax, eax
jne 0x40efcd
lea ebx, [esp]
push esi
push 0x800
push 1
push ebx
call dword [sym.imp.MSVCR90.dll_fread]
push ebp
push eax
push 1
push ebx
call dword [sym.imp.MSVCR90.dll_fwrite]
push esi
call dword [sym.imp.MSVCR90.dll_feof]
add esp, 0x24
test eax, eax
je 0x40efa5
push ebp
call dword [sym.imp.MSVCR90.dll_fclose]
pop ecx
push esi
call dword [sym.imp.MSVCR90.dll_fclose]
pop ecx
mov eax, 1
add esp, 0x686c
pop ebx
pop ebp
pop esi
pop edi
ret
cmp dword [esp + 0x6868], 0
jle 0x40f0b7
mov dword [esp], edi
mov edi, edx
mov dword [esp + 8], esi
mov dword [esp + 4], ebx
xor eax, eax
mov esi, ebp
mov ebp, eax
movsx ebx, word [edi + ebp*2]
lea ecx, [ebx - 0x20]
cmp ecx, 0x3e
ja case.0x40f021.33
mov ecx, dword [ecx*4 + 0x41d560]
jmp ecx
cmp ebx, 0x7e
je case.0x40f021.32
push esi
movzx ecx, bx
push ecx
call dword [sym.imp.MSVCR90.dll_fputwc]
add esp, 8
jmp 0x40f09a
push esi
push 0x25
movzx ebx, bl
call dword [sym.imp.MSVCR90.dll_fputc]
push esi
push 0
call dword [sym.imp.MSVCR90.dll_fputc]
add esp, 0x10
mov ecx, ebx
shr ecx, 4
cmp ecx, 9
jg 0x40f05f
add ecx, 0x30
jmp 0x40f062
add ecx, 0x57
push esi
push ecx
call dword [sym.imp.MSVCR90.dll_fputc]
push esi
push 0
call dword [sym.imp.MSVCR90.dll_fputc]
add esp, 0x10
and ebx, 0xf
cmp ebx, 9
jg 0x40f083
add ebx, 0x30
jmp 0x40f086
add ebx, 0x57
push esi
push ebx
call dword [sym.imp.MSVCR90.dll_fputc]
push esi
push 0
call dword [sym.imp.MSVCR90.dll_fputc]
add esp, 0x10
inc ebp
cmp ebp, dword [esp + 0x6868]
jl 0x40f00e
mov ebx, dword [esp + 4]
mov ebp, esi
mov esi, dword [esp + 8]
mov edx, edi
mov edi, dword [esp]
push edx
call dword [sym.imp.avutil.dll_av_free]
pop ecx
jmp 0x40ed52
mov eax, dword [esp + 0x6864]
push ebp
add eax, eax
push eax
push 1
push dword [esp + 0xc]
call dword [sym.imp.MSVCR90.dll_fwrite]
push dword [esp + 0x10]
call dword [sym.imp.avutil.dll_av_free]
add esp, 0x14
jmp 0x40ec62