Function at 0x474360
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x1c
push ebx
push ebp
xor al, al
xor ebx, ebx
push esi
mov si, dx
mov byte [esp + 0xc], al
push edi
xor eax, eax
mov word [esp + 0x12], si
mov dword [esp + 0x14], ebx
mov edi, ecx
mov dword [esp + 0x1c], edi
cmp ax, si
jae 0x4745bf
push edi
push 1
lea eax, [esp + 0x28]
mov ebp, 0x102
push 4
push eax
call fcn.0048a645
add esp, 0x10
cmp eax, 1
jne 0x4745e1
push edi
push eax
push eax
lea eax, [esp + 0x30]
push eax
call fcn.0048a645
add esp, 0x10
cmp eax, 1
jne 0x4745e1
xor eax, eax
push edi
mov word [esp + 0x29], ax
push 1
cmp word [esp + 0x38], bp
jne 0x474422
lea eax, [esp + 0x19]
push 1
push eax
call fcn.0048a645
add esp, 0x10
cmp eax, 1
jne 0x4745e1
push edi
push eax
lea eax, [esp + 0x2f]
push 2
push eax
call fcn.0048a645
add esp, 0x10
cmp eax, 1
jne 0x4745e1
movzx eax, byte [esp + 0x11]
inc ax
mov word [esp + 0x25], ax
mov eax, dword [esp + 0x20]
cmp eax, 8
jle 0x47446c
add eax, 0xfffffff8
jmp 0x474460
lea eax, [esp + 0x2d]
push 2
push eax
call fcn.0048a645
add esp, 0x10
cmp eax, 1
jne 0x4745e1
push edi
push eax
lea eax, [esp + 0x2f]
push 2
push eax
call fcn.0048a645
add esp, 0x10
cmp eax, 1
jne 0x4745e1
mov eax, dword [esp + 0x20]
cmp eax, 9
jle 0x47446c
add eax, 0xfffffff7
push 1
push eax
push edi
call fcn.00489f05
add esp, 0xc
push edi
call fcn.00490094
add esp, 4
test eax, eax
jne 0x4745e1
mov ax, word [esp + 0x25]
movzx ebp, bx
movzx edx, ax
mov word [ebp*2 + 0x550fe0], ax
mov eax, 0x100
cmp dx, ax
jle 0x4744a9
mov edx, eax
mov word [ebp*2 + 0x550fe0], ax
mov byte [esp + 0x10], 1
cmp word [esp + 0x27], 0
jbe 0x474565
mov ecx, ebp
call fcn.00420780
test al, al
je 0x4745c9
movzx eax, word [esp + 0x27]
push edi
push eax
push 1
push 0x53db80
call fcn.0048a645
movzx ecx, word [esp + 0x37]
add esp, 0x10
cmp eax, ecx
jne 0x4745e1
push dword [0x551eac]
movzx eax, word [ebp*2 + 0x550fe0]
mov ecx, dword [ebp*4 + 0x551ee0]
push eax
call fcn.00474600
mov edx, dword [ebp*4 + 0x551ee0]
add esp, 8
mov ecx, dword [0x551eac]
test edx, edx
je 0x474565
cmp ecx, 0x20
jge 0x474565
mov eax, 0x20
lea esi, [edx + ecx*4]
sub eax, ecx
add esi, ecx
lea eax, [eax + eax*4]
mov dword [esp + 0x18], eax
movzx eax, word [ebp*2 + 0x550fe0]
movsx ebx, ax
test ebx, ebx
jle 0x47455c
mov edi, dword [esp + 0x18]
push edi
push 0
push esi
call fcn.00484500
add esp, 0xc
add esi, 0xa0
sub ebx, 1
jne 0x474541
mov edi, dword [esp + 0x1c]
mov si, word [esp + 0x12]
mov ebx, dword [esp + 0x14]
mov ecx, ebx
call fcn.00420820
test al, al
je 0x47459c
mov eax, dword [ebp*4 + 0x551ee0]
test eax, eax
je 0x47458f
push eax
call fcn.00488f53
add esp, 4
mov dword [ebp*4 + 0x551ee0], 0
mov eax, 0x40
mov word [ebp*2 + 0x550fe0], ax
inc ebx
mov dword [esp + 0x14], ebx
cmp bx, si
jb 0x47438c
cmp byte [esp + 0x10], 0
je 0x4745bf
push str.This_module_contains_pattern_s__with_a_length_above_256__They_will_be_truncated.
call dword [0x54e480]
add esp, 4
pop edi
pop esi
pop ebp
mov al, 1
pop ebx
add esp, 0x1c
ret
push str.Not_enough_memory_
call dword [0x54e480]
add esp, 4
xor al, al
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1c
ret
push str.Error_loading_XM:_This_file_is_corrupt_
call dword [0x54e480]
add esp, 4
xor al, al
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1c
ret