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

Disassembly:
sub esp, 0xcc
mov eax, 0x47
push ebx
mov dword [esp + 0x60], eax
mov dword [esp + 0x90], eax
mov dword [esp + 0xa0], eax
mov eax, dword [0x4c722c]
push ebp
push esi
lea eax, [eax + eax*2]
push edi
xor esi, esi
mov ebx, 0x50
mov edi, 0x4b
mov edx, 0x4d
mov ecx, 0x4f
mov dword [esp + 0x4c], ebx
shl eax, 4
mov dword [esp + 0x50], esi
mov dword [esp + 0x54], esi
mov dword [esp + 0x58], esi
mov dword [esp + 0x5c], edi
mov dword [esp + 0x60], edx
mov dword [esp + 0x64], ecx
mov dword [esp + 0x68], esi
mov dword [esp + 0x70], esi
mov dword [esp + 0x74], esi
mov dword [esp + 0x78], esi
mov dword [esp + 0x7c], edi
mov dword [esp + 0x80], edx
mov dword [esp + 0x84], ecx
mov dword [esp + 0x88], esi
mov dword [esp + 0x8c], ebx
mov dword [esp + 0x90], esi
mov dword [esp + 0x94], esi
mov dword [esp + 0x98], esi
mov dword [esp + 0xa0], esi
mov dword [esp + 0xa4], esi
mov dword [esp + 0xa8], esi
mov dword [esp + 0xb0], esi
mov dword [esp + 0xb4], esi
mov dword [esp + 0xb8], esi
mov dword [esp + 0xbc], edi
mov dword [esp + 0xc0], edx
mov dword [esp + 0xc4], ecx
mov dword [esp + 0xc8], esi
mov dword [esp + 0xcc], ebx
mov dword [esp + 0xd0], esi
mov dword [esp + 0xd4], esi
mov dword [esp + 0xd8], esi
mov ecx, dword [esp + eax + 0x4c]
mov edx, dword [esp + eax + 0x50]
mov dword [esp + 0x1c], ecx
mov ecx, dword [esp + eax + 0x54]
mov dword [esp + 0x20], edx
mov edx, dword [esp + eax + 0x58]
mov dword [esp + 0x24], ecx
mov ecx, dword [esp + eax + 0x5c]
mov dword [esp + 0x28], edx
mov edx, dword [esp + eax + 0x60]
mov dword [esp + 0x2c], ecx
mov ecx, dword [esp + eax + 0x64]
mov dword [esp + 0x30], edx
mov edx, dword [esp + eax + 0x68]
mov ebx, dword [esp + 0xe0]
mov dword [esp + 0x34], ecx
mov ecx, dword [esp + eax + 0x6c]
mov dword [esp + 0x38], edx
mov edx, dword [esp + eax + 0x70]
mov dword [esp + 0x3c], ecx
mov ecx, dword [esp + eax + 0x74]
mov dword [esp + 0x40], edx
mov edx, dword [esp + eax + 0x78]
lea edi, [esp + 0x1c]
lea eax, [esp + 0x1c]
mov dword [esp + 0x44], ecx
mov dword [esp + 0x48], edx
mov dword [esp + 0x14], esi
mov dword [esp + 0x18], edi
mov dword [esp + 0x10], eax
mov ecx, dword [esp + 0x10]
xor ebp, ebp
mov eax, dword [ecx]
cmp eax, esi
je 0x4030e7
mov ecx, dword [0x670734]
push eax
push 1
push 2
mov edx, dword [ecx]
push ebx
push 1
push esi
push ecx
call dword [edx + 0x28]
test eax, eax
jl 0x4030dc
mov edx, dword [edi]
mov eax, dword [0x670734]
push edx
push ebx
mov ecx, dword [eax]
push ebx
push 1
push esi
push eax
call dword [ecx + 0x30]
test eax, eax
jge 0x403125
mov eax, dword [edi + 4]
add edi, 4
inc ebp
cmp eax, esi
jne 0x4030ac
mov edi, dword [esp + 0x10]
mov eax, dword [esp + 0x14]
add edi, 0x10
inc eax
mov dword [esp + 0x10], edi
mov edi, dword [esp + 0x18]
add edi, 0x10
cmp eax, 3
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], edi
jb 0x4030a0
push str.CGraphic::GetDepthStencilFormat:_d3df__D3DFMT_UNKNOWN_n
call fcn.0040d0b0
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xcc
ret
mov edi, dword [esp + 0x14]
cmp edi, esi
je 0x40315a
lea eax, [ebp + edi*4]
mov ecx, dword [esp + eax*4 + 0x1c]
push ecx
call fcn.00401cc0
mov edx, dword [esp + 0x20]
add esp, 4
push eax
push edx
call fcn.00401cc0
add esp, 4
push eax
push str.CGraphic::GetDepthStencilFormat:_d3df___s_____s_n
call fcn.0040d0b0
add esp, 0xc
lea eax, [ebp + edi*4]
pop edi
pop esi
pop ebp
mov eax, dword [esp + eax*4 + 0x10]
pop ebx
add esp, 0xcc
ret