Function at 0x104fc7e0
Capabilities:
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x8c
mov eax, dword [0x10a78b80]
xor eax, esp
mov dword [esp + 0x88], eax
mov eax, dword [esp + 0x98]
test eax, eax
push ebx
mov ebx, dword [esp + 0x94]
push ebp
push esi
push edi
mov edi, dword [esp + 0xa4]
lea esi, [esp + 0x58]
push closesocket
push 0x1058dafb
mov dword [esp + 0x60], 0x1058dafb
cmovne esi, eax
mov dword [esp + 0x64], 0
mov byte [esp + 0x68], 1
mov dword [esp + 0x6c], 0
call fcn.1050b4f0
xor edx, edx
add esp, 8
test eax, eax
mov ecx, eax
cmovle edx, eax
sub ecx, edx
cmp ecx, eax
cmovge ecx, eax
xor eax, eax
test ecx, ecx
cmovg eax, ecx
lea ecx, [edx + 0x1058dafb]
test ecx, ecx
je 0x104fc877
cmp eax, 0x7fffffff
jne 0x104fc877
push eax
push ecx
call fcn.1050b4f0
add esp, 8
test esi, esi
mov dword [esp + 0x18], 0x1058dafb
push closesocket
lea ebp, [esp + 0x1c]
mov dword [esp + 0x20], 0
push 0x1058dafb
mov byte [esp + 0x28], 1
cmovne ebp, esi
mov dword [esp + 0x2c], 0
call fcn.1050b4f0
xor edx, edx
add esp, 8
test eax, eax
mov ecx, eax
cmovle edx, eax
sub ecx, edx
cmp ecx, eax
cmovge ecx, eax
xor eax, eax
test ecx, ecx
cmovg eax, ecx
lea ecx, [edx + 0x1058dafb]
test ecx, ecx
je 0x104fc8e1
cmp eax, 0x7fffffff
jne 0x104fc8e1
push eax
push ecx
call fcn.1050b4f0
add esp, 8
mov eax, dword [edi]
lea ecx, [esp + 0x38]
push ebp
push 4
push ecx
mov ecx, edi
call dword [eax + 4]
cmp dword [esi + 0xc], 0
jne 0x104fcd7b
cmp dword [esp + 0x38], 0x7c
jb 0x104fcd7b
push esi
lea eax, [esp + 0x40]
push eax
push edi
call fcn.10495bf0
add esp, 0xc
cmp dword [esi + 0xc], 0
jne 0x104fcdf5
mov eax, dword [esp + 0x3c]
and eax, 0x1007
cmp eax, 0x1007
je 0x104fc95e
push closesocket
push str.DDS:_Invalid_flags.
call fcn.1050b4f0
add esp, 8
mov edx, eax
cmp dword [esi + 0xc], 0
jne 0x104fcdf5
xor ecx, ecx
test edx, edx
cmovle ecx, edx
lea ebx, [ecx + str.DDS:_Invalid_flags.]
jmp 0x104fcda2
push esi
lea eax, [esp + 0x50]
push eax
push edi
call fcn.10495bf0
push esi
lea eax, [esp + 0x58]
push eax
push edi
call fcn.10495bf0
push esi
lea eax, [esp + 0x84]
push eax
push edi
call fcn.10495bf0
push esi
lea eax, [esp + 0x78]
push eax
push edi
call fcn.10495bf0
push esi
lea eax, [esp + 0x88]
push eax
push edi
call fcn.10495bf0
mov eax, dword [edi + 4]
lea ecx, [edi + 4]
add esp, 0x3c
mov dword [esp + 0x44], ecx
push 1
push 0
push 0x2c
call dword [eax + 4]
push esi
lea eax, [esp + 0x70]
push eax
push edi
call fcn.10495bf0
push esi
lea eax, [esp + 0x38]
push eax
push edi
call fcn.10495bf0
push esi
lea eax, [esp + 0x48]
push eax
push edi
call fcn.10495bf0
push esi
lea eax, [esp + 0x68]
push eax
push edi
call fcn.10495bf0
test esi, esi
mov dword [esp + 0x48], 0x1058dafb
push closesocket
lea ebp, [esp + 0x4c]
mov dword [esp + 0x50], 0
push 0x1058dafb
mov byte [esp + 0x58], 1
cmovne ebp, esi
mov dword [esp + 0x5c], 0
call fcn.1050b4f0
xor edx, edx
add esp, 0x38
test eax, eax
mov ecx, eax
cmovle edx, eax
sub ecx, edx
cmp ecx, eax
cmovge ecx, eax
xor eax, eax
test ecx, ecx
cmovg eax, ecx
lea ecx, [edx + 0x1058dafb]
test ecx, ecx
je 0x104fca50
cmp eax, 0x7fffffff
jne 0x104fca50
push eax
push ecx
call fcn.1050b4f0
add esp, 8
mov eax, dword [edi]
lea ecx, [esp + 0x78]
push ebp
push 0x10
push ecx
mov ecx, edi
call dword [eax + 4]
test esi, esi
mov dword [esp + 0x18], 0x1058dafb
push closesocket
lea ebp, [esp + 0x1c]
mov dword [esp + 0x20], 0
push 0x1058dafb
mov byte [esp + 0x28], 1
cmovne ebp, esi
mov dword [esp + 0x2c], 0
call fcn.1050b4f0
xor edx, edx
add esp, 8
test eax, eax
mov ecx, eax
cmovle edx, eax
sub ecx, edx
cmp ecx, eax
cmovge ecx, eax
xor eax, eax
test ecx, ecx
cmovg eax, ecx
lea ecx, [edx + 0x1058dafb]
test ecx, ecx
je 0x104fcac9
cmp eax, 0x7fffffff
jne 0x104fcac9
push eax
push ecx
call fcn.1050b4f0
add esp, 8
mov eax, dword [edi]
lea ecx, [esp + 0x88]
push ebp
push 0x10
push ecx
mov ecx, edi
call dword [eax + 4]
mov eax, dword [edi + 4]
lea ecx, [edi + 4]
push 1
push 0
push 4
call dword [eax + 4]
cmp dword [esi + 0xc], 0
jne 0x104fcdf5
mov eax, dword [esp + 0x28]
xor edx, edx
mov ebp, dword [esp + 0x2c]
mov dword [esp + 0x30], edx
mov dword [esp + 0x34], 1
test al, 4
je 0x104fcb67
cmp ebp, 0x30315844
jne 0x104fcb67
push esi
lea eax, [esp + 0x34]
push eax
push edi
call fcn.10495bf0
push esi
lea eax, [esp + 0x24]
push eax
push edi
call fcn.10495bf0
push esi
lea eax, [esp + 0x8c]
push eax
push edi
call fcn.10495bf0
push esi
lea eax, [esp + 0x5c]
push eax
push edi
call fcn.10495bf0
push esi
lea eax, [esp + 0xa8]
push eax
push edi
call fcn.10495bf0
mov ebp, dword [esp + 0x68]
add esp, 0x3c
mov edx, dword [esp + 0x30]
mov eax, dword [esp + 0x28]
cmp dword [esi + 0xc], 0
jne 0x104fcdf5
test dword [esp + 0x88], 0x1000
jne 0x104fcbb8
push closesocket
push str.DDS:_Unsupported_caps.
call fcn.1050b4f0
mov dword [esp + 0x20], str.DDS:_Unsupported_caps.
add esp, 8
mov dword [esp + 0x1c], eax
lea eax, [esp + 0x18]
mov byte [esp + 0x20], 1
mov ecx, esi
push eax
push dword [0x10a45458]
call fcn.104da190
jmp 0x104fcdf5
mov ecx, dword [esp + 0x8c]
mov dword [esp + 0x14], ecx
shr dword [esp + 0x14], 9
and byte [esp + 0x14], 1
je 0x104fcbf6
and ecx, 0xfc00
cmp ecx, 0xfc00
je 0x104fcbf6
push closesocket
push str.DDS:_Incomplete_cubemap.
call fcn.1050b4f0
mov dword [esp + 0x20], str.DDS:_Incomplete_cubemap.
jmp 0x104fcb95
and al, 1
mov byte [esp + 0x12], 0
xor ecx, ecx
mov byte [esp + 0x13], al
test edx, edx
jne 0x104fcca0
mov edx, dword [esp + 0x28]
test edx, 4
je 0x104fcc47
xor eax, eax
nop dword [eax]
cmp dword [eax + 0x10a46128], ebp
je 0x104fcc38
add eax, 0xc
inc ecx
cmp eax, 0x2a0
jb 0x104fcc20
jmp 0x104fccd1
lea eax, [ecx + ecx*2]
mov edi, dword [eax*4 + 0x10a4612c]
jmp 0x104fcccc
mov eax, 0x10a466f8
nop dword [eax]
mov ebp, dword [esp + 0x40]
cmp dword [eax - 8], ebp
mov ebp, dword [esp + 0x80]
jne 0x104fcc8b
cmp dword [eax - 4], edx
jne 0x104fcc8b
mov edx, dword [esp + 0x78]
cmp dword [eax], edx
mov edx, dword [esp + 0x28]
jne 0x104fcc8b
mov edi, dword [esp + 0x7c]
cmp dword [eax + 4], edi
mov edi, dword [esp + 0x84]
jne 0x104fcc8b
cmp dword [eax + 8], ebp
jne 0x104fcc8b
cmp dword [eax + 0xc], edi
je 0x104fcc9b
add ecx, 0x1c
add eax, 0x1c
cmp ecx, 0x268
jb 0x104fcc50
jmp 0x104fccd1
mov edi, dword [eax + 0x10]
jmp 0x104fcccc
xor eax, eax
cmp dword [eax + 0x10a463c8], edx
je 0x104fccb7
add eax, 0xc
inc ecx
cmp eax, 0x324
jb 0x104fcca2
jmp 0x104fccd1
lea eax, [ecx + ecx*2]
mov edi, dword [eax*4 + 0x10a463cc]
mov al, byte [eax*4 + 0x10a463d0]
mov byte [esp + 0x12], al
cmp edi, 0x22
jne 0x104fcced
push closesocket
push str.DDS:_Unknown_texture_format.
call fcn.1050b4f0
mov dword [esp + 0x20], str.DDS:_Unknown_texture_format.
jmp 0x104fcb95
mov ecx, dword [esp + 0x44]
mov dword [ebx], 0
mov dword [ebx + 4], 0
mov dword [ebx + 0x10], 0
mov eax, dword [ecx]
push 1
push 0
push 0
mov eax, dword [eax + 4]
call eax
test dword [esp + 0x88], 0x400000
mov ecx, 1
mov dword [ebx + 0x14], eax
mov eax, dword [esp + 0x48]
mov dword [ebx + 0x18], eax
mov eax, dword [esp + 0x4c]
mov dword [ebx + 0x1c], eax
mov eax, dword [esp + 0x50]
mov dword [ebx + 0x20], eax
mov ax, word [esp + 0x34]
mov word [ebx + 0x24], ax
movzx eax, byte [esp + 0x54]
cmovne ecx, eax
mov dword [ebx + 8], edi
mov al, byte [esp + 0x13]
mov byte [ebx + 0x27], al
mov eax, dword [esp + 0x14]
mov byte [ebx + 0x28], al
mov al, byte [esp + 0x12]
mov byte [ebx + 0x2c], al
mov al, 1
mov dword [ebx + 0xc], 0
mov byte [ebx + 0x26], cl
mov word [ebx + 0x29], 0
mov byte [ebx + 0x2b], 0
jmp 0x104fcdf7
push closesocket
push str.DDS:_Invalid_header_size.
call fcn.1050b4f0
add esp, 8
mov edx, eax
cmp dword [esi + 0xc], 0
jne 0x104fcdf5
xor ecx, ecx
test edx, edx
cmovle ecx, edx
lea ebx, [ecx + str.DDS:_Invalid_header_size.]
mov eax, edx
mov dword [esi + 0xc], 0x676d6962
sub eax, ecx
mov dword [esi], 0x1058dafb
cmp eax, edx
mov dword [esi + 4], 0
mov byte [esi + 8], 1
cmovge eax, edx
xor edi, edi
test eax, eax
cmovg edi, eax
test ebx, ebx
je 0x104fcdf5
cmp edi, 0x7fffffff
jne 0x104fcde2
push edi
push ebx
call fcn.1050b4f0
add esp, 8
jmp 0x104fcde4
mov eax, edi
mov dword [esi + 4], eax
cmp edi, 0x7fffffff
sete al
mov byte [esi + 8], al
mov dword [esi], ebx
xor al, al
mov ecx, dword [esp + 0x98]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.105116c0
add esp, 0x8c
ret