Function at 0x477a70
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x124
mov eax, dword [0x4f6fc0]
xor eax, ebp
mov dword [ebp - 4], eax
mov dword [ebp - 0x114], 0
mov dword [ebp - 0x11c], 0
mov al, byte [0x54e6b4]
mov byte [ebp - 0x10], al
xor ecx, ecx
mov dword [ebp - 0xf], ecx
mov dword [ebp - 0xb], ecx
mov byte [ebp - 7], cl
mov dword [ebp - 0x120], 0
movsx edx, word [ebp + 8]
test edx, edx
jl 0x477ac5
movsx eax, word [ebp + 8]
cmp eax, 4
jle 0x477acc
xor eax, eax
jmp 0x4781d0
movsx ecx, word [ebp + 8]
cmp dword [ecx*4 + 0x54e688], 1
jne 0x477ae4
mov eax, 1
jmp 0x4781d0
mov edx, dword [ebp + 0xc]
push edx
movsx eax, word [ebp + 8]
shl eax, 8
add eax, 0x5705c0
push eax
call fcn.004b5e60
add esp, 8
push 0x4ec270
movsx ecx, word [ebp + 8]
shl ecx, 8
add ecx, 0x5705c0
push ecx
call fcn.0041a470
add esp, 8
mov dword [ebp - 0x114], eax
cmp dword [ebp - 0x114], 0
jne 0x477b53
movsx edx, word [ebp + 8]
cmp edx, 1
je 0x477b4c
movsx eax, word [ebp + 8]
shl eax, 8
add eax, 0x5705c0
push eax
push str.ERROR:_Couldnt_open_file:__s
push 0
call fcn.004417b0
add esp, 0xc
xor eax, eax
jmp 0x4781d0
movsx ecx, word [ebp + 8]
shl ecx, 8
add ecx, 0x5705c0
push ecx
push str.OpenStrRez_OPENED__2___s
push 3
call fcn.004417b0
add esp, 0xc
push 9
push 0
lea edx, [ebp - 0x10]
push edx
call fcn.004b6780
add esp, 0xc
mov eax, dword [ebp - 0x114]
push eax
push 6
push 1
lea ecx, [ebp - 0x10]
push ecx
call fcn.004b8e47
add esp, 0x10
cmp eax, 6
je 0x477bbc
mov edx, dword [ebp - 0x114]
push edx
call fcn.00419ca0
add esp, 4
mov dword [ebp - 0x114], 0
xor eax, eax
jmp 0x4781d0
push 0
push 0
mov eax, dword [ebp - 0x114]
push eax
call fcn.004b8f82
add esp, 0xc
lea ecx, [ebp - 0x10]
push ecx
call fcn.004b98d0
add esp, 4
add eax, 0xa
mov dword [ebp - 0x11c], eax
cmp dword [ebp - 0x11c], 0xa
jne 0x477c19
call fcn.00421740
push eax
mov edx, dword [ebp + 0xc]
push edx
call fcn.004b5ff0
add esp, 8
test eax, eax
je 0x477c0f
mov dword [ebp - 0x11c], 0x9c40
jmp 0x477c19
mov dword [ebp - 0x11c], 0x7530
push 2
push 0
mov eax, dword [ebp - 0x114]
push eax
call fcn.004b8f82
add esp, 0xc
mov ecx, dword [ebp - 0x114]
push ecx
call fcn.004b935a
add esp, 4
mov dword [ebp - 0x120], eax
mov edx, dword [ebp - 0x114]
push edx
call fcn.004b9a1d
add esp, 4
mov eax, dword [ebp - 0x120]
add eax, 0xa
push eax
call fcn.004b6c11
add esp, 4
mov dword [ebp - 0x124], eax
movsx ecx, word [ebp + 8]
mov edx, dword [ebp - 0x124]
mov dword [ecx*4 + 0x54e6c0], edx
cmp dword [ebp - 0x124], 0
jne 0x477ca2
mov eax, dword [ebp - 0x114]
push eax
call fcn.00419ca0
add esp, 4
mov dword [ebp - 0x114], 0
xor eax, eax
jmp 0x4781d0
mov ecx, dword [ebp - 0x114]
push ecx
push 1
mov edx, dword [ebp - 0x120]
push edx
movsx eax, word [ebp + 8]
mov ecx, dword [eax*4 + 0x54e6c0]
push ecx
call fcn.004b8e47
add esp, 0x10
test eax, eax
jne 0x477d0d
movsx edx, word [ebp + 8]
mov eax, dword [edx*4 + 0x54e6c0]
push eax
call fcn.004b6bd9
add esp, 4
movsx ecx, word [ebp + 8]
mov dword [ecx*4 + 0x54e6c0], 0
mov edx, dword [ebp - 0x114]
push edx
call fcn.00419ca0
add esp, 4
mov dword [ebp - 0x114], 0
xor eax, eax
jmp 0x4781d0
mov eax, dword [ebp - 0x114]
push eax
call fcn.00419ca0
add esp, 4
mov dword [ebp - 0x114], 0
movsx ecx, word [ebp + 8]
mov edx, dword [ebp - 0x120]
mov dword [ecx*4 + 0x54e69c], edx
movsx eax, word [ebp + 8]
mov dword [eax*4 + 0x54e688], 1
movsx ecx, word [ebp + 8]
mov edx, dword [ecx*4 + 0x54e6c0]
mov eax, dword [ebp - 0x11c]
mov byte [edx + eax - 3], 0
mov ecx, dword [ebp - 0x11c]
sub ecx, 2
movsx edx, word [ebp + 8]
mov dword [edx*4 + 0x54e6e4], ecx
movsx eax, word [ebp + 8]
test eax, eax
je 0x477d81
movsx ecx, word [ebp + 8]
cmp ecx, 2
jne 0x477db3
movsx edx, word [0x54e8fc]
test edx, edx
je 0x477d96
mov dword [0x54e8f8], 1
call fcn.00477430
movsx ecx, word [ebp + 8]
mov word [ecx*2 + 0x54e6d8], ax
mov dword [0x54e8f8], 0
jmp 0x477dc4
movsx edx, word [ebp + 8]
mov eax, 0x409
mov word [edx*2 + 0x54e6d8], ax
movsx ecx, word [ebp + 8]
movsx edx, word [ecx*2 + 0x54e6d8]
mov dword [ebp - 0x118], edx
cmp dword [ebp - 0x118], 0x804
jg 0x477e24
cmp dword [ebp - 0x118], 0x804
je 0x477e93
mov eax, dword [ebp - 0x118]
sub eax, 0x401
mov dword [ebp - 0x118], eax
cmp dword [ebp - 0x118], 0x4f
ja case.0x477e1d.1
mov ecx, dword [ebp - 0x118]
movzx edx, byte [ecx + 0x478240]
jmp dword [edx*4 + 0x4781e0]
cmp dword [ebp - 0x118], 0x816
je 0x478037
jmp case.0x477e1d.1
push 0x4ec2b0
movsx eax, word [ebp + 8]
lea ecx, [eax*4 + 0x5705a0]
push ecx
call fcn.004b5e60
add esp, 8
jmp 0x478134
push 0x4ec2b4
movsx edx, word [ebp + 8]
lea eax, [edx*4 + 0x5705a0]
push eax
call fcn.004b5e60
add esp, 8
jmp 0x478134
push 0x4ec2b8
movsx ecx, word [ebp + 8]
lea edx, [ecx*4 + 0x5705a0]
push edx
call fcn.004b5e60
add esp, 8
jmp 0x478134
push 0x4ec2bc
movsx eax, word [ebp + 8]
lea ecx, [eax*4 + 0x5705a0]
push ecx
call fcn.004b5e60
add esp, 8
jmp 0x478134
push 0x4ec2c0
movsx edx, word [ebp + 8]
lea eax, [edx*4 + 0x5705a0]
push eax
call fcn.004b5e60
add esp, 8
jmp 0x478134
push 0x4ec2c4
movsx ecx, word [ebp + 8]
lea edx, [ecx*4 + 0x5705a0]
push edx
call fcn.004b5e60
add esp, 8
jmp 0x478134
push 0x4ec2c8
movsx eax, word [ebp + 8]
lea ecx, [eax*4 + 0x5705a0]
push ecx
call fcn.004b5e60
add esp, 8
jmp 0x478134
push 0x4ec2cc
movsx edx, word [ebp + 8]
lea eax, [edx*4 + 0x5705a0]
push eax
call fcn.004b5e60
add esp, 8
jmp 0x478134
push 0x4ec2d0
movsx ecx, word [ebp + 8]
lea edx, [ecx*4 + 0x5705a0]
push edx
call fcn.004b5e60
add esp, 8
jmp 0x478134
push 0x4ec2d4
movsx eax, word [ebp + 8]
lea ecx, [eax*4 + 0x5705a0]
push ecx
call fcn.004b5e60
add esp, 8
jmp 0x478134
push 0x4ec2d8
movsx edx, word [ebp + 8]
lea eax, [edx*4 + 0x5705a0]
push eax
call fcn.004b5e60
add esp, 8
jmp 0x478134
push 0x4ec2dc
movsx ecx, word [ebp + 8]
lea edx, [ecx*4 + 0x5705a0]
push edx
call fcn.004b5e60
add esp, 8
jmp 0x478134
push 0x4ec2e0
movsx eax, word [ebp + 8]
lea ecx, [eax*4 + 0x5705a0]
push ecx
call fcn.004b5e60
add esp, 8
jmp 0x478134
push 0x4ec2e4
movsx edx, word [ebp + 8]
lea eax, [edx*4 + 0x5705a0]
push eax
call fcn.004b5e60
add esp, 8
jmp 0x478134
push 0x4ec2e8
movsx ecx, word [ebp + 8]
lea edx, [ecx*4 + 0x5705a0]
push edx
call fcn.004b5e60
add esp, 8
jmp 0x478134
push 0x4ec2ec
movsx eax, word [ebp + 8]
lea ecx, [eax*4 + 0x5705a0]
push ecx
call fcn.004b5e60
add esp, 8
jmp 0x478134
push 0x4ec2f0
movsx edx, word [ebp + 8]
lea eax, [edx*4 + 0x5705a0]
push eax
call fcn.004b5e60
add esp, 8
jmp 0x478134
push 0x4ec2f4
movsx ecx, word [ebp + 8]
lea edx, [ecx*4 + 0x5705a0]
push edx
call fcn.004b5e60
add esp, 8
jmp 0x478134
push 0x4ec2f8
movsx eax, word [ebp + 8]
lea ecx, [eax*4 + 0x5705a0]
push ecx
call fcn.004b5e60
add esp, 8
jmp 0x478134
push 0x4ec2fc
movsx edx, word [ebp + 8]
lea eax, [edx*4 + 0x5705a0]
push eax
call fcn.004b5e60
add esp, 8
jmp 0x478134
push 0x4ec300
movsx ecx, word [ebp + 8]
lea edx, [ecx*4 + 0x5705a0]
push edx
call fcn.004b5e60
add esp, 8
jmp 0x478134
push 0x4ec304
movsx eax, word [ebp + 8]
lea ecx, [eax*4 + 0x5705a0]
push ecx
call fcn.004b5e60
add esp, 8
jmp 0x478134
push 0x4ec308
movsx edx, word [ebp + 8]
lea eax, [edx*4 + 0x5705a0]
push eax
call fcn.004b5e60
add esp, 8
jmp 0x478134
push 0x4ec30c
movsx ecx, word [ebp + 8]
lea edx, [ecx*4 + 0x5705a0]
push edx
call fcn.004b5e60
add esp, 8
jmp 0x478134
push 0x4ec310
movsx eax, word [ebp + 8]
lea ecx, [eax*4 + 0x5705a0]
push ecx
call fcn.004b5e60
add esp, 8
jmp 0x478134
push 0x4ec5c8
movsx edx, word [ebp + 8]
lea eax, [edx*4 + 0x5705a0]
push eax
call fcn.004b5e60
add esp, 8
movsx ecx, word [ebp + 8]
lea edx, [ecx*4 + 0x5705a0]
push edx
movsx eax, word [ebp + 8]
push eax
push str.OS_Language:__d_s
push 2
call fcn.004417b0
add esp, 0x10
movsx ecx, word [ebp + 8]
test ecx, ecx
jne 0x478175
movsx edx, word [ebp + 8]
lea eax, [edx*4 + 0x5705a0]
push eax
push 0x54e6f8
call fcn.004b5e60
add esp, 8
lea ecx, [ebp - 0x110]
push ecx
push 0x4ec328
push 0
call fcn.00475ed0
add esp, 0xc
lea edx, [ebp - 0x110]
push edx
push str.MSG__s
push 0x54e7f8
call fcn.004b6e08
add esp, 0xc
push 0x54e805
push 0x54e804
call fcn.0042f830
add esp, 8
movsx eax, word [0x54e8fc]
test eax, eax
je 0x4781cb
call fcn.004784d0
call fcn.004778f0
mov eax, 1
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004b6253
mov esp, ebp
pop ebp
ret